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

androidx.compose.animation.core

Annotations

ExperimentalTransitionApi
InternalAnimationApi

Interfaces

Animation

This interface provides a convenient way to query from an VectorizedAnimationSpec or FloatDecayAnimationSpec: It spares the need to pass the starting conditions and in some cases ending condition for each value or velocity query, and instead only requires the play time to be passed for such queries.

AnimationSpec

AnimationSpec stores the specification of an animation, including 1) the data type to be animated, and 2) the animation configuration (i.e. VectorizedAnimationSpec) that will be used once the data (of type T) has been converted to AnimationVector.

DecayAnimationSpec

DecayAnimationSpec stores the specification of an animation, including 1) the data type to be animated, and 2) the animation configuration (i.e. VectorizedDecayAnimationSpec) that will be used once the data (of type T) has been converted to AnimationVector.

DurationBasedAnimationSpec

This describes AnimationSpecs that are based on a fixed duration, such as KeyframesSpec, TweenSpec, and SnapSpec.

Easing

Easing is a way to adjust an animation’s fraction.

FiniteAnimationSpec

FiniteAnimationSpec is the interface that all non-infinite AnimationSpecs implement, including: TweenSpec, SpringSpec, KeyframesSpec, RepeatableSpec, SnapSpec, etc.

FloatAnimationSpec

FloatAnimationSpec interface is similar to VectorizedAnimationSpec, except it deals exclusively with floats.

FloatDecayAnimationSpec

This animation interface is intended to be stateless, just like Animation.

Transition.Segment

Segment holds initialState and targetState, which are the beginning and end of a transition.

TwoWayConverter

TwoWayConverter class contains the definition on how to convert from an arbitrary type T to a AnimationVector, and convert the AnimationVector back to the type T.

VectorizedAnimationSpec

VectorizedAnimationSpecs are stateless vector based animation specifications.

VectorizedDecayAnimationSpec

VectorizedDecayAnimationSpecs are stateless vector based decay animation specifications.

VectorizedDurationBasedAnimationSpec

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

VectorizedFiniteAnimationSpec

All the finite VectorizedAnimationSpecs implement this interface, including: VectorizedKeyframesSpec, VectorizedTweenSpec, VectorizedRepeatableSpec, VectorizedSnapSpec, VectorizedSpringSpec, etc.

Classes

Animatable

Animatable is a value holder that automatically animates its value when the value is changed via animateTo.

AnimatableKt
AnimateAsStateKt
AnimationKt
AnimationResult

AnimationResult contains information about an animation at the end of the animation.

AnimationScope

AnimationScope provides all the animation related info specific to an animation run.

AnimationSpecKt
AnimationState

AnimationState contains the necessary information to indicate the state of an animation.

AnimationStateKt
AnimationVector

AnimationVector class that is the base class of AnimationVector1D, AnimationVector2D, AnimationVector3D and AnimationVector4D.

AnimationVector1D

This class defines a 1D vector.

AnimationVector2D

This class defines a 2D vector that contains two Float values for the two dimensions.

AnimationVector3D

This class defines a 3D vector that contains three Float value fields for the three dimensions.

AnimationVector4D

This class defines a 4D vector that contains four Float fields for its four dimensions.

AnimationVectorsKt
AtomicReference
CubicBezierEasing

A cubic polynomial easing.

DecayAnimation

DecayAnimation is an animation that slows down from initialVelocityVector as time goes on.

DecayAnimationSpecKt
EasingFunctionsKt
EasingKt
FloatExponentialDecaySpec

This is a decay animation where the friction/deceleration is always proportional to the velocity.

FloatSpringSpec

FloatSpringSpec animation uses a spring animation to animate a Float value.

FloatTweenSpec

FloatTweenSpec animates a Float value from any start value to any end value using a provided easing function.

InfiniteAnimationPolicyKt
InfiniteRepeatableSpec

InfiniteRepeatableSpec repeats the provided animation infinite amount of times.

InfiniteTransition

InfiniteTransition is responsible for running child animations.

InfiniteTransition.TransitionAnimationState

Each animation created using InfiniteTransition.animateColor, InfiniteTransition.animateFloat, or InfiniteTransition.animateValue is represented as a TransitionAnimationState in InfiniteTransition.

InfiniteTransitionKt
KeyframesSpec

KeyframesSpec creates a VectorizedKeyframesSpec animation.

KeyframesSpec.KeyframeEntity

Holder class for building a keyframes animation.

KeyframesSpec.KeyframesSpecConfig

KeyframesSpecConfig stores a mutable configuration of the key frames, including durationMillis, delayMillis, and all the key frames.

MutableTransitionState

MutableTransitionState contains two fields: currentState and targetState.

RepeatableSpec

RepeatableSpec takes another DurationBasedAnimationSpec and plays it iterations times.

SnapSpec

SnapSpec describes a jump-cut type of animation.

SpringSpec

Creates a SpringSpec that uses the given spring constants (i.e. dampingRatio and stiffness.

StartOffset

This class defines a start offset for repeatable and infiniteRepeatable.

StartOffsetType

This class defines the two types of StartOffset: StartOffsetType.Delay and StartOffsetType.FastForward.

SuspendAnimationKt
TargetBasedAnimation

This is a convenient animation wrapper class that works for all target based animations, i.e. animations that has a pre-defined end value, unlike decay.

Transition

Transition manages all the child animations on a state level.

Transition.TransitionAnimationState

Each animation created using animateFloat, animateDp, etc is represented as a TransitionAnimationState in Transition.

TransitionKt
TweenSpec

Creates a TweenSpec configured with the given duration, delay, and easing curve.

VectorConvertersKt
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.

VectorizedInfiniteRepeatableSpec

This animation takes another VectorizedDurationBasedAnimationSpec and plays it infinite times.

VectorizedKeyframesSpec

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

VectorizedRepeatableSpec

This animation takes another VectorizedDurationBasedAnimationSpec and plays it iterations times.

VectorizedSnapSpec

VectorizedSnapSpec immediately snaps the animating value to the end value.

VectorizedSpringSpec

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

VectorizedTweenSpec

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

VisibilityThresholdsKt
AnimationConstants
Spring

Physics class contains a number of recommended configurations for physics animations.

StartOffsetType.Companion

Enums

AnimationEndReason

Possible reasons for Animatables to end.

RepeatMode

Repeat mode for RepeatableSpec and VectorizedRepeatableSpec.