The second Android 11 Developer Preview is now available, test it out and share your feedback.

AnimatedFloatModel

@Model class AnimatedFloatModel : AnimatedFloat
kotlin.Any
   ↳ androidx.animation.BaseAnimatedValue<kotlin.Float, androidx.animation.AnimationVector1D>
   ↳ androidx.animation.AnimatedFloat
   ↳ androidx.ui.animation.AnimatedFloatModel

Model class for AnimatedFloat. This class tracks the value field change, so that composables that read from this field can get promptly recomposed as the animation updates the value.

Summary

Public constructors

Model class for AnimatedFloat.

Inherited functions

Inherited extension functions

From androidx.animation
Unit
AnimatedFloat.fling(startVelocity: Float, decay: DecayAnimation = ExponentialDecay(), onEnd: OnAnimationEnd? = null)

Starts a fling animation with the specified starting velocity.

Unit
AnimatedFloat.fling(startVelocity: Float, decay: DecayAnimation = ExponentialDecay(), adjustTarget: (Float) -> TargetAnimation?, onEnd: OnAnimationEnd? = null)

Starts a fling animation with the specified starting velocity.

From androidx.ui.foundation.animation
Unit
AnimatedFloat.fling(config: FlingConfig, startVelocity: Float)

Starts a fling animation with the specified starting velocity and fling configuration.

Properties

Float

The overridden value field that can only be mutated by animation

Inherited properties

Public constructors

<init>

AnimatedFloatModel(
    value: Float,
    clock: AnimationClockObservable)

Model class for AnimatedFloat. This class tracks the value field change, so that composables that read from this field can get promptly recomposed as the animation updates the value.

Parameters
value: Float The overridden value field that can only be mutated by animation
clock: AnimationClockObservable The animation clock that will be used to drive the animation

Properties

value

var value: Float

The overridden value field that can only be mutated by animation