Google is committed to advancing racial equity for Black communities. See how.

AnimatedValue

abstract class AnimatedValue<T, V : AnimationVector> : BaseAnimatedValue<T, V>
kotlin.Any
   ↳ androidx.compose.animation.core.BaseAnimatedValue<T, V>
   ↳ androidx.compose.animation.core.AnimatedValue

AnimatedValue is an animatable value holder. It can hold any type of value, and automatically animate the value change when the value is changed via animateTo. AnimatedValue supports value change during an ongoing value change animation. When that happens, a new animation will transition AnimatedValue from its current value (i.e. value at the point of interruption) to the new target. This ensures that the value change is always continuous.

Summary

Public constructors
<init>(typeConverter: TwoWayConverter<T, V>, clock: AnimationClockObservable, visibilityThreshold: T? = null)

AnimatedValue is an animatable value holder.

Inherited functions
Extension functions
From androidx.compose.material
Unit
AnimatedValue<Dp, *>.animateElevation(from: Interaction? = null, to: Interaction? = null, target: Dp)

Animates the Dp value of this between from and tos, to target.

Properties
V

Inherited properties

Public constructors

<init>

AnimatedValue(
    typeConverter: TwoWayConverter<T, V>,
    clock: AnimationClockObservable,
    visibilityThreshold: T? = null)

AnimatedValue is an animatable value holder. It can hold any type of value, and automatically animate the value change when the value is changed via animateTo. AnimatedValue supports value change during an ongoing value change animation. When that happens, a new animation will transition AnimatedValue from its current value (i.e. value at the point of interruption) to the new target. This ensures that the value change is always continuous.

Parameters
typeConverter: TwoWayConverter<T, V> Converter for converting value type T to AnimationVector, and vice versa
clock: AnimationClockObservable The animation clock used to drive the animation.
visibilityThreshold: T? = null Threshold at which the animation may round off to its target value.

Properties

velocity

val velocity: V