Android 12 Developer Preview is here! Try it out, and give us your feedback!

AnimationEndReason

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

Possible reasons for Animatables to end.

Summary

Enum values

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

Animation has finished successfully without any interruption.

Inherited extension functions
From androidx.core.util
infix Range<T>
T.rangeTo(that: T)

Creates a range from this Comparable value to that.

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 Animatable.updateBounds)

Unlike Finished, 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 AnimationResult.

Finished

enum val Finished : AnimationEndReason

Animation has finished successfully without any interruption.