androidx.compose.animation.core
InfiniteRepeatableSpec
Class · from org.jetbrains.compose.animation:animation-core:1.12.2
No hand-written docs yet.
InfiniteRepeatableSpec repeats the provided animation infinite amount of times. It will never naturally finish. This means the animation will only be stopped via some form of manual cancellation. When used with transition or other animation composables, the infinite animations will stop when the composable is removed from the compose tree.
class InfiniteRepeatableSpec<T>(
animation: DurationBasedAnimationSpec<T>,
repeatMode: RepeatMode = RepeatMode.Restart,
initialStartOffset: StartOffset = StartOffset(0),
) : AnimationSpec<T>
Is a
How to get one
Create it
InfiniteRepeatableSpec(animation, repeatMode, initialStartOffset)constructor
Properties
animation
val animation: DurationBasedAnimationSpec<T>
repeatMode
val repeatMode: RepeatMode
initialStartOffset
val initialStartOffset: StartOffset
Library docs
InfiniteRepeatableSpec repeats the provided animation infinite amount of times. It will never
naturally finish. This means the animation will only be stopped via some form of manual
cancellation. When used with transition or other animation composables, the infinite animations
will stop when the composable is removed from the compose tree.
For non-infinite repeating animations, consider RepeatableSpec.
initialStartOffset can be used to either delay the start of the animation or to fast forward
the animation to a given play time. This start offset will not be repeated, whereas the delay
in the animation (if any) will be repeated. By default, the amount of offset is 0.