LottieAnimation
Last Updated On 2021-07-16
Version 1MinSDK 16Tutorial Video
Lottie Animation lets you add Custom Animation from Lottie.
The Source File should be a .json file or a Url Pointing to it.
SDK Version: 3.5.0
Properties
You can set the below properties in the UI part of the builder.
- AnimationSpeed - it's a non negative float value which is set to 1.0 by default.
- EndFrame - it's a integer value which is set to 120 by default.
- HeihMargin - it's a four value which is set to 0,0,0,0 by default.
- HeihPadding - it's a four value which is set to 0,0,0,0 by default.
- Loop - it's a boolean value which is set to false by default.
- MarginBottom - it's a non negative float value which is set to 0 by default.
- MarginLeft - it's a non negative float value which is set to 0 by default.
- MarginRight - it's a non negative float value which is set to 0 by default.
- MarginTop - it's a non negative float value which is set to 0 by default.
- PaddingBottom - it's a non negative float value which is set to 0 by default.
- PaddingLeft - it's a non negative float value which is set to 0 by default.
- PaddingRight - it's a non negative float value which is set to 0 by default.
- PaddingTop - it's a non negative float value which is set to 0 by default.
- Scale - it's a non negative float value which is set to 1 by default.
- Source - it's a asset value which is set to blank by default.
- StartFrame - it's a non negative integer value which is set to 1 by default.
- Visible - it's a visibility value which is set to true by default.
Block Properties
You can set the below blocks properties in the blocks section of the builder.
AnimationSpeed
Set the speed of the animation.
EndFrame
Set the Ending Frame
Height
Specifies the vertical height of the LottieAnimation, measured in pixels.
HeightPercent
Specifies the vertical height of the LottieAnimation as a percentage of the height of the Screen.
Loop
Set Animation Loop
MarginBottom
Property for MarginBottom
MarginLeft
Property for MarginLeft
MarginRight
Property for MarginRight
MarginTop
Property for MarginTop
PaddingBottom
Property for PaddingBottom
PaddingLeft
Property for PaddingLeft
PaddingRight
Property for PaddingRight
PaddingTop
Property for PaddingTop
Scale
Set the Scale of the animation
Source
Set The Json File URL
StartFrame
Set the Starting Frame
Visible
Specifies whether the LottieAnimation should be visible on the screen. Value is true if the LottieAnimation is showing and false if hidden.
Width
Specifies the horizontal width of the LottieAnimation, measured in pixels.
WidthPercent
Specifies the horizontal width of the LottieAnimation as a percentage of the width of the Screen.
Methods
You can set the below method blocks in the blocks section of the builder.
CancelAnimation
Method for CancelAnimation
GetCurrentFrame
Method for GetCurrentFrame
IsAnimating
Method for IsAnimating
PauseAnimation
Method for PauseAnimation
ResumeAnimation
Method for ResumeAnimation
SetAnimationFrame
Method for SetAnimationFrame
StartAnimation
Method for StartAnimation
Events
You can set the below event blocks in the blocks section of the builder.
AnimationCanceled
Event for AnimationCanceled
AnimationEnded
Event for AnimationEnded
AnimationRepeated
Event for AnimationRepeated
AnimationStarted
Event for AnimationStarted
Click
Event for Click
ErrorOccurred
Called when Some Error Happens