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 }
|
{ Private declarations }
|
||||||
public
|
public
|
||||||
{ Public declarations }
|
{ Public declarations }
|
||||||
|
procedure Animation( aLayout : TFMXObject );
|
||||||
end;
|
end;
|
||||||
|
|
||||||
var
|
var
|
||||||
@ -28,9 +29,16 @@ uses
|
|||||||
|
|
||||||
{$R *.fmx}
|
{$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);
|
procedure TViewPrincipal.FormCreate(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
TRouter4D.Render<TMainLayout>.SetElement(Layout1, Layout1);
|
TRouter4D.Render<TMainLayout>.SetElement(Layout1, Layout1);
|
||||||
|
TRouter4D.Link.Animation(Animation);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|||||||
Binary file not shown.
@ -41,10 +41,14 @@ type
|
|||||||
function IndexLink ( aPatch : String ) : iRouter4DLink;
|
function IndexLink ( aPatch : String ) : iRouter4DLink;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
Router4DLink : iRouter4DLink;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
{ TRouter4DLink }
|
{ TRouter4DLink }
|
||||||
|
|
||||||
|
|
||||||
uses Router4D.History;
|
uses Router4D.History;
|
||||||
|
|
||||||
{$IFDEF HAS_FMX}
|
{$IFDEF HAS_FMX}
|
||||||
@ -198,7 +202,13 @@ end;
|
|||||||
|
|
||||||
class function TRouter4DLink.New: iRouter4DLink;
|
class function TRouter4DLink.New: iRouter4DLink;
|
||||||
begin
|
begin
|
||||||
Result := Self.Create;
|
if not Assigned(Router4DLink) then
|
||||||
|
Router4DLink := Self.Create;
|
||||||
|
|
||||||
|
Result := Router4DLink;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
initialization
|
||||||
|
Router4DLink := TRouter4DLink.New;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user