Animation View User Control

Official Content
This documentation is valid for:

Animation View is a User Control whose purpose is to allow users 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, Panel for Smart Device or Work With for Smart Devices.

Animation View UC_1

Methods

SetAnimation

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

Syntax:
SetAnimation (AnimationClass, Loop)

Where:
Parameter Type Description
AnimationClass    Character    Class of the Theme for Smart Devices with the animation to be loaded   
Loop Boolean Indicates if the animation will be played in loop or not

Example:
Event Start
   AnimationView1.SetAnimation(ThemeClass: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 indicating the percentage of progress from where the animation will start.   

Example:
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 indicating the position (progress) from where the animation execution will start.   
ToPosition Numeric Value from 0 to 1 indicating the position (progress) to where the animation execution will finish. 

Examples:
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 ( )

Example:
Event 'PauseAnimation'
   AnimationView1.Pause()
Endevent

Scope

Platforms: SmartDevices (Android, iOS), Web(.Net, Java)
Objects: Panel for Smart Devices, Work With for Smart Devices, Web Panels

Was this page helpful?
What Is This?
Your feedback about this content is important. Let us know what you think.