GeneXus allows integrating animations when developing Mobile Smart Devices applications, more specifically, Lottie animations.
Lottie is an animations library, created by Airbnb. It is highly flexible, allows creating any kind of animations, uses small files and provides a JSON API to integrate the animations in mobile applications. With these JSON files, we can include the animations in a GeneXus Knowledge Base. Many design software tools provide export capabilities to Lottie JSON format files. In addition, there are several animations repositories (like this one) where a lot of animations in JSON files can be downloaded.
To include the animations in the Knowledge Base, we need to do two things:
In the Smart Device Themes, there is a new classes category named "Animations." For each animation to be included in the KB, a new Animation class must be defined, setting "Lottie" in the Type property and setting the File object containing the Lottie JSON animation file in the File property.
After the class is created, the animation is ready to be included in the Smart Device application.
Now that the animations are included the KB, we can proceed to integrate them in the application. There are two ways to make this integration:
Using the Animation View User Control, an animation can be included on any screen of a Smart Device application. The control provides methods that allow setting the animation and managing its execution and progress.
&Progress = 0.5
It is possible to use animations to customize the loading process of object forms and grids. That is, we can replace the usual loading circle with a more sophisticated Lottie animation.
To do this, there is a new property in Form and Grid classes in Smart Device Themes, named Loading Animation Class where an animation can be set using the Animation classes defined in the Theme with the Lottie files.