AnimatedVector
data class AnimatedVector(@DrawableRes val resId: Int, val atEnd: Boolean = false, val replayMode: ToolkitIconReplayMode = ToolkitIconReplayMode.Restart, val loop: Boolean = false, val loopTrigger: ToolkitIconLoopTrigger = ToolkitIconLoopTrigger.Immediately) : ToolkitIcon.Animated(source)
Icon backed by an Animated Vector Drawable.
The drawable is expected to declare exactly two states, the first and the last frame, the way androidx.compose.animation.graphics reads an animated-vector. Components play it forward when they are clicked or become selected, and back to the first frame when they lose selection.
Constructors
Link copied to clipboard
constructor(@DrawableRes resId: Int, atEnd: Boolean = false, replayMode: ToolkitIconReplayMode = ToolkitIconReplayMode.Restart, loop: Boolean = false, loopTrigger: ToolkitIconLoopTrigger = ToolkitIconLoopTrigger.Immediately)
Properties
Link copied to clipboard
Whether the drawable animates continuously. Defaults to false, which keeps the click driven playback. The cycle follows replayMode.
Link copied to clipboard
What starts a declared loop. Defaults to ToolkitIconLoopTrigger.Immediately, which plays as soon as the icon is composed.
Link copied to clipboard
What a repeated click does once the animation already ran. Defaults to ToolkitIconReplayMode.Restart.