DotLottieEventListener Interface API Reference
The DotLottieEventListener
interface defines a set of callback methods that respond to various animation events. Implementing this interface allows for handling animation lifecycle events, playback state changes, and rendering updates.
Methods
Event Method | Description |
---|---|
onLoop(loopCount: UInt) | Called when the animation completes a loop. loopCount indicates the number of times the animation has looped. |
onRender(frameNo: Float) | Invoked for each frame rendered. frameNo is the current frame number. |
onStop() | Triggered when the animation stops. |
onFrame(frame: Float) | Called with the current frame number whenever the animation updates. |
onPause() | Invoked when the animation is paused. |
onPlay() | Triggered when the animation starts playing. |
onComplete() | Called when the animation completes all its loops and stops. |
onLoad() | Invoked when the animation is successfully loaded and ready to play. |
onLoadError() | Called if there is an error loading the animation. |
onLoadError(error: Throwable) | Called if there is an error. |
onFreeze() | Triggered when the animation is frozen at the current frame. |
onUnFreeze() | Invoked when the animation resumes from a frozen state. |
onDestroy() | Called when the animation is destroyed and resources are released. |
This API reference provides a comprehensive overview of the DotLottieEventListener
interface, enabling developers to effectively manage and respond to animation events within their applications.