Class

Transition.TransitionAnimationState

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

Source set: Common
public inner class TransitionAnimationState<T, V : AnimationVector> internal constructor(
        initialValue: T,
        initialVelocityVector: V,
        public val typeConverter: TwoWayConverter<T, V>,
        public val label: String,
    ) : State<T>

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

Properties

animationSpec

Source set: Common
public var animationSpec: FiniteAnimationSpec<T> by mutableStateOf(defaultSpring)

AnimationSpec that is used for current animation run. This can change when targetState changes.

animation

Source set: Common
public var animation: TargetBasedAnimation<T, V> by
            mutableStateOf(
                TargetBasedAnimation(
                    animationSpec,
                    typeConverter,
                    initialValue,
                    targetValue,
                    initialVelocityVector,
                )
            )

All the animation configurations including initial value/velocity & target value for animating from currentState to targetState are captured in animation.

value

Source set: Common
override var value: T by mutableStateOf(initialValue)

Functions

toString

Source set: Common
override fun toString(): String
Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: