Android 12 Developer Preview is here! Try it out, and give us your feedback!

VectorizedRepeatableSpec

class VectorizedRepeatableSpec<V : AnimationVector> : VectorizedFiniteAnimationSpec<V>
kotlin.Any
   ↳ androidx.compose.animation.core.VectorizedRepeatableSpec

This animation takes another VectorizedDurationBasedAnimationSpec and plays it iterations times. For infinitely repeating animation spec, VectorizedInfiniteRepeatableSpec is recommended.

Note: When repeating in the RepeatMode.Reverse mode, it's highly recommended to have an odd number of iterations. Otherwise, the animation may jump to the end value when it finishes the last iteration.

Summary

Public constructors
<init>(iterations: Int, animation: VectorizedDurationBasedAnimationSpec<V>, repeatMode: RepeatMode = RepeatMode.Restart)

This animation takes another VectorizedDurationBasedAnimationSpec and plays it iterations times.

Public methods
Long
getDurationNanos(initialValue: V, targetValue: V, initialVelocity: V)

Calculates the duration of an animation.

V
getValueFromNanos(playTimeNanos: Long, initialValue: V, targetValue: V, initialVelocity: V)

Calculates the value of the animation at given the playtime, with the provided start/end values, and start velocity.

V
getVelocityFromNanos(playTimeNanos: Long, initialValue: V, targetValue: V, initialVelocity: V)

Calculates the velocity of the animation at given the playtime, with the provided start/end values, and start velocity.

Inherited functions
Inherited properties