mirror of
https://github.com/CloudDelphi/Router4Delphi.git
synced 2025-12-19 08:43:43 +01:00
Incluido Recurso de Transição
This commit is contained in:
parent
72c4fef9fd
commit
61c5482ce7
Binary file not shown.
@ -14,6 +14,7 @@ type
|
||||
{ Private declarations }
|
||||
public
|
||||
{ Public declarations }
|
||||
procedure Animation( aLayout : TFMXObject );
|
||||
end;
|
||||
|
||||
var
|
||||
@ -28,9 +29,16 @@ uses
|
||||
|
||||
{$R *.fmx}
|
||||
|
||||
procedure TViewPrincipal.Animation(aLayout: TFMXObject);
|
||||
begin
|
||||
TLayout(aLayout).Opacity := 0;
|
||||
TLayout(aLayout).AnimateFloat('Opacity', 1, 0.2);
|
||||
end;
|
||||
|
||||
procedure TViewPrincipal.FormCreate(Sender: TObject);
|
||||
begin
|
||||
TRouter4D.Render<TMainLayout>.SetElement(Layout1, Layout1);
|
||||
TRouter4D.Link.Animation(Animation);
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
Binary file not shown.
@ -41,10 +41,14 @@ type
|
||||
function IndexLink ( aPatch : String ) : iRouter4DLink;
|
||||
end;
|
||||
|
||||
var
|
||||
Router4DLink : iRouter4DLink;
|
||||
|
||||
implementation
|
||||
|
||||
{ TRouter4DLink }
|
||||
|
||||
|
||||
uses Router4D.History;
|
||||
|
||||
{$IFDEF HAS_FMX}
|
||||
@ -198,7 +202,13 @@ end;
|
||||
|
||||
class function TRouter4DLink.New: iRouter4DLink;
|
||||
begin
|
||||
Result := Self.Create;
|
||||
if not Assigned(Router4DLink) then
|
||||
Router4DLink := Self.Create;
|
||||
|
||||
Result := Router4DLink;
|
||||
end;
|
||||
|
||||
initialization
|
||||
Router4DLink := TRouter4DLink.New;
|
||||
|
||||
end.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user