infiniteRepeatable
Common
public fun <T> infiniteRepeatable(
animation: DurationBasedAnimationSpec<T>,
repeatMode: RepeatMode = RepeatMode.Restart,
initialStartOffset: StartOffset = StartOffset(0),
): InfiniteRepeatableSpec<T>
Creates a InfiniteRepeatableSpec that plays a DurationBasedAnimationSpec (e.g. TweenSpec, KeyframesSpec) infinite amount of iterations.
For non-infinitely repeating animations, consider repeatable.
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.
Parameters
| animation | animation that will be repeated |
| repeatMode | whether animation should repeat by starting from the beginning (i.e. RepeatMode.Restart) or from the end (i.e. RepeatMode.Reverse) |
| initialStartOffset | offsets the start of the animation |
Common
Deprecated This method has been deprecated in favor of the infinite repeatable function that accepts start offset.
infiniteRepeatable
public fun <T> infiniteRepeatable(
animation: DurationBasedAnimationSpec<T>,
repeatMode: RepeatMode = RepeatMode.Restart,
): InfiniteRepeatableSpec<T>