{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

VectorizedFiniteAnimationSpec

@<Error class: unknown class>
public interface VectorizedFiniteAnimationSpec<V extends AnimationVector> extends VectorizedAnimationSpec

Known direct subclasses
VectorizedDurationBasedAnimationSpec

Base class for VectorizedAnimationSpecs that are based on a fixed durationMillis.

VectorizedFloatAnimationSpec

A convenient implementation of VectorizedFloatAnimationSpec that turns a FloatAnimationSpec into a multi-dimensional VectorizedFloatAnimationSpec, by using the same FloatAnimationSpec on each dimension of the AnimationVector that is being animated.

VectorizedRepeatableSpec

This animation takes another VectorizedDurationBasedAnimationSpec and plays it iterations times.

VectorizedSpringSpec

VectorizedSpringSpec uses spring animations to animate (each dimension of) AnimationVectors.

Known indirect subclasses
VectorizedKeyframesSpec

VectorizedKeyframesSpec class manages the animation based on the values defined at different timestamps in the duration of the animation (i.e. different keyframes).

VectorizedSnapSpec

VectorizedSnapSpec immediately snaps the animating value to the end value.

VectorizedTweenSpec

VectorizedTweenSpec animates a AnimationVector value by interpolating the start and end value, in the given durationMillis using the given easing curve.


All the finite VectorizedAnimationSpecs implement this interface, including: VectorizedKeyframesSpec, VectorizedTweenSpec, VectorizedRepeatableSpec, VectorizedSnapSpec, VectorizedSpringSpec, etc. The VectorizedAnimationSpec that does not implement this is: InfiniteRepeatableSpec.

Summary

Public methods

default boolean

Whether or not the VectorizedAnimationSpec specifies an infinite animation.

Inherited methods

From androidx.compose.animation.core.VectorizedAnimationSpec
abstract long
getDurationNanos(
    @NonNull V initialValue,
    @NonNull V targetValue,
    @NonNull V initialVelocity
)

Calculates the duration of an animation.

default @NonNull V
getEndVelocity(
    @NonNull V initialValue,
    @NonNull V targetValue,
    @NonNull V initialVelocity
)

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

abstract @NonNull V
getValueFromNanos(
    long playTimeNanos,
    @NonNull V initialValue,
    @NonNull V targetValue,
    @NonNull V initialVelocity
)

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

abstract @NonNull V
getVelocityFromNanos(
    long playTimeNanos,
    @NonNull V initialValue,
    @NonNull V targetValue,
    @NonNull V initialVelocity
)

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

Public methods

isInfinite

default boolean isInfinite()

Whether or not the VectorizedAnimationSpec specifies an infinite animation. That is, one that will not finish by itself, one that needs an external action to stop. For examples, an indeterminate progress bar, which will only stop when it is removed from the composition.