# AnimationEndReason

Artifact: [androidx.compose.animation:animation-core](https://developer.android.com/jetpack/androidx/releases/compose-animation) [View Source](https://cs.android.com/search?q=file:androidx/compose/animation/core/AnimationEndReason.kt+class:androidx.compose.animation.core.AnimationEndReason) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-animation#1.0.0) Common/All
- Cmn

  ```
  enum AnimationEndReason : Enum<AnimationEndReason>
  ```

|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) |||
| ↳ | [kotlin.Enum](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-enum/index.html)\<[AnimationEndReason](https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationEndReason)\> ||
|   | ↳ | [androidx.compose.animation.core.AnimationEndReason](https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationEndReason) |

*** ** * ** ***

Possible reasons for `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/Animatable`s to end.

## Summary

| ### Enum Values |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationEndReason#BoundReached` | Animation will be forced to end when its value reaches upper/lower bound (if they have been defined, e.g. via `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/Animatable#updateBounds(kotlin.Any,kotlin.Any)`) |
| `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationEndReason#Finished` | Animation has finished successfully without any interruption. |

| ### Public functions |
|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationEndReason` | `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationEndReason#valueOf(kotlin.String)(value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` Returns the enum constant of this type with the specified name. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationEndReason>` | `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationEndReason#values()()` Returns an array containing the constants of this enum type, in the order they're declared. | Cmn |

| ### Public properties |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.enums/-enum-entries/index.html<https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationEndReason>` | `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationEndReason#entries()` Returns an immutable `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.enums/-enum-entries/index.html` list containing the constants of this enum type, in the order they're declared. | Cmn |

## Enum Values

### BoundReached

```
val AnimationEndReason.BoundReached: AnimationEndReason
```

Animation will be forced to end when its value reaches upper/lower bound (if they have been defined, e.g. via `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/Animatable#updateBounds(kotlin.Any,kotlin.Any)`)

Unlike `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationEndReason#Finished`, when an animation ends due to `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationEndReason#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 `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationResult`.

### Finished

```
val AnimationEndReason.Finished: AnimationEndReason
```

Animation has finished successfully without any interruption.

## Public functions

### valueOf

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-animation#1.0.0)

```
fun valueOf(value: String): AnimationEndReason
```

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | if this enum type has no constant with the specified name |

### values

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-animation#1.0.0)

```
fun values(): Array<AnimationEndReason>
```

Returns an array containing the constants of this enum type, in the order they're declared.

This method may be used to iterate over the constants.

The function returns a new instance of the array on every call. The array could be mutated, so working with it may also require defensive copying. Consider using `entries` property as a more efficient alternative returning an immutable list of enum entries.

## Public properties

### entries

Cmn

```
val entries: EnumEntries<AnimationEndReason>
```

Returns an immutable `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.enums/-enum-entries/index.html` list containing the constants of this enum type, in the order they're declared.