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

TargetAnimation

data class TargetAnimation
kotlin.Any
   ↳ androidx.animation.TargetAnimation

TargetAnimation class defines how to animate to a given target value.

Summary

Public constructors

<init>(target: Float, animation: AnimationBuilder<Float> = PhysicsBuilder())

TargetAnimation class defines how to animate to a given target value.

Inherited extension functions

From androidx.compose
operator T

IMPORTANT: This global operator is TEMPORARY, and should be removed whenever an answer for contextual composers is reached.

Properties

AnimationBuilder<Float>

The animation that will be used to animate to the target destination.

Float

Target value for the animation to animate to

Public constructors

<init>

TargetAnimation(
    target: Float,
    animation: AnimationBuilder<Float> = PhysicsBuilder())

TargetAnimation class defines how to animate to a given target value.

Parameters
target: Float Target value for the animation to animate to
animation: AnimationBuilder<Float> = PhysicsBuilder() The animation that will be used to animate to the target destination. This animation defaults to a Spring Animation unless specified.

Properties

animation

val animation: AnimationBuilder<Float>

The animation that will be used to animate to the target destination. This animation defaults to a Spring Animation unless specified.

target

val target: Float

Target value for the animation to animate to