Official Content

Animation View is a User Control whose purpose is to allow you to integrate animations in applications screens and manage their behavior.

This control is distributed with GeneXus. The control can be found in the Miscellaneous section of the Toolbox and should be dragged to the layout of a Web Panel object, Panel object or Work With object.

Animation View Control - v18

Methods

SetAnimation

With this method, a Lottie animation is loaded in the control using the Animation classes of the Theme object.

Syntax

SetAnimation(AnimationClass, Loop)

Where:

Parameter Type Description
AnimationClass    Character    Class of the Theme or DSO with the animation to be loaded.   
Loop Boolean Indicates if the animation will be played in a loop or not.


Sample

Event Start
   AnimationView1.SetAnimation(StyleClass:Birthday, true)
Endevent

SetProgress

This method allows setting the progress of the animation (already set with the SetAnimation method) to any point.

Syntax

SetProgress(Progress)

Where:

Parameter    Type Description
Progress    Numeric    Value from 0 to 1 indicates the percentage of progress from where the animation will start.   


Sample

Event 'SetProgress'
   &Progress = 0.5
   AnimationView1.SetProgress(&Progress)
Endevent

Play

Used to start the animation.

Syntax

Play(FromPosition -optional-, ToPosition -optional-)

Where:

Parameter    Type Description
FromPosition    Numeric    Value from 0 to 1 indicates the position (progress) from where the animation execution will start.   
ToPosition Numeric Value from 0 to 1 indicates the position (progress) to where the animation execution will finish. 


Samples

Event 'PlayAnimation'
   // Animation will be execution completly
   AnimationView1.Play()
Endevent

Event 'PlayAnimation2' 
   // Animation will be executed until the middle point
   // If only one parameter is indicated, it is used as ToPosition
   AnimationView1.Play(0.5) 
Endevent

Event 'PlayAnimation3' 
   // Animation will be executed from the middle point to 3/4 progress
   AnimationView1.Play(0.5, 0.75) 
Endevent

Pause

Used to pause the animation.

Syntax

Pause( )

Sample

Event 'PauseAnimation'
   AnimationView1.Pause()
Endevent

Scope

Generators: Android, Apple, .NET Framework, .NET, Java
Objects: Panel, Work With, Web Panel

Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant