AnimationEndReason

enum class AnimationEndReason
kotlin.Any
   ↳ kotlin.Enum<androidx.animation.AnimationEndReason>
   ↳ androidx.animation.AnimationEndReason

Possible reasons with which DynamicTargetAnimation can finish

Summary

Enum values

Animation will be forced to end when its value reaches upper/lower bound (if they have been defined, e.

Animation was interrupted, e.

Animation has successfully reached the DynamicTargetAnimation.targetValue value and come to stop

Enum values

BoundReached

enum val BoundReached : AnimationEndReason

Animation will be forced to end when its value reaches upper/lower bound (if they have been defined, e.g via AnimatedFloat.setBounds)

Unlike TargetReached, when an animation ends due to BoundReached, it often falls short from its initial target, and the remaining velocity is often non-zero. Both the end value and the remaining velocity can be obtained via onEnd param in AnimatedFloat.fling callback

Interrupted

enum val Interrupted : AnimationEndReason

Animation was interrupted, e.g by another animation

TargetReached

enum val TargetReached : AnimationEndReason

Animation has successfully reached the DynamicTargetAnimation.targetValue value and come to stop