Create Floating Animation With TAnimateFloat In Delphi Firemonkey

Floating Panel Animation Delphi FiremonkeyRad Studio XE2 introduced FireMonkey animation effects. A list of these effects, their description, methods, properties, and events can be found here. For each animation effect, Embarcadero also provides code examples. For example, for the TFloatAnimation effect, Embarcadero has provided five different examples at the bottom of the page. The simplest of the demos demonstrates how to make a rectangle fade from its original color state to transparent. This should work cross platform on Android, IOS, OSX, and Windows.

However, below I have provided a simple demo of using the TAnimateFloat effect as well.  Unlike Embarcadero’s examples, this demo utilizes TFloatAnimation at runtime to make a “Hello World” Splash screen from a TPanel.

Start by creating two controls (pnl: TPanel & lbl: TLabel) in the main form’s class.

Add the following code to the form’s OnActivate and OnCreate events.

In order to make the Panel reverse directions and go the other way, we will add an OnClick event for the TPanel created at runtime.

Head over and see the other properties of TAnimateFloat.

Have Delphi Firemonkey questions? Ask and get answers on StackOverflow.

Create Floating Animation With TAnimateFloat In Delphi Firemonkey by Delphi XE5 XE6 XE7 XE8 10 Seattle Berlin Firemonkey, Delphi Android, Delphi IOS is licensed under a Creative Commons Attribution 4.0 International License.

Leave a Reply

Show Buttons
Hide Buttons
Read previous post:
Handle Back Button Delphi Android
Handle Hardware Back Button In Delphi XE5 Firemonkey On Android

If you are looking for how to handle the hardware back button in your Delphi Android application then I think...