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

VectorizedSnapSpec

class VectorizedSnapSpec<V : AnimationVector> : VectorizedDurationBasedAnimationSpec<V>
kotlin.Any
   ↳ androidx.compose.animation.core.VectorizedSnapSpec

VectorizedSnapSpec immediately snaps the animating value to the end value.

Summary

Public constructors
<init>(delayMillis: Int = 0)

VectorizedSnapSpec immediately snaps the animating value to the end value.

Public methods
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
Properties
Int

the amount of time (in milliseconds) that the animation should wait before it starts.

Int

duration is the amount of time while animation is not yet finished.

Inherited properties