# Animatable2.AnimationCallback

Added in[API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

# AnimationCallback

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/android/graphics/drawable/Animatable2.AnimationCallback "View this page in Java")  

```
abstract class AnimationCallback
```

|---|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                                                     ||
| ↳ | [android.graphics.drawable.Animatable2.AnimationCallback](https://developer.android.com/reference/kotlin/android/graphics/drawable/Animatable2.AnimationCallback#) |

## Summary

|                                                                      Public constructors                                                                      ||
|------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [AnimationCallback](https://developer.android.com/reference/kotlin/android/graphics/drawable/Animatable2.AnimationCallback#AnimationCallback())`()` <br /> |

|                                                                                                                                                                                                   Public methods                                                                                                                                                                                                    ||
|----------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| open[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onAnimationEnd](https://developer.android.com/reference/kotlin/android/graphics/drawable/Animatable2.AnimationCallback#onAnimationEnd(android.graphics.drawable.Drawable))`(`drawable:` `[Drawable](https://developer.android.com/reference/kotlin/android/graphics/drawable/Drawable)!`)` Called when the animation ends.       |
| open[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onAnimationStart](https://developer.android.com/reference/kotlin/android/graphics/drawable/Animatable2.AnimationCallback#onAnimationStart(android.graphics.drawable.Drawable))`(`drawable:` `[Drawable](https://developer.android.com/reference/kotlin/android/graphics/drawable/Drawable)!`)` Called when the animation starts. |

## Public constructors

### AnimationCallback

```
AnimationCallback()
```

## Public methods

### onAnimationEnd

Added in[API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
open fun onAnimationEnd(drawable: Drawable!): Unit
```

Called when the animation ends.

|                                                                   Parameters                                                                    ||
|------------|-------------------------------------------------------------------------------------------------------------------------------------|
| `drawable` | [Drawable](https://developer.android.com/reference/kotlin/android/graphics/drawable/Drawable)!:The drawable finished the animation. |

### onAnimationStart

Added in[API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
open fun onAnimationStart(drawable: Drawable!): Unit
```

Called when the animation starts.

|                                                                   Parameters                                                                   ||
|------------|------------------------------------------------------------------------------------------------------------------------------------|
| `drawable` | [Drawable](https://developer.android.com/reference/kotlin/android/graphics/drawable/Drawable)!:The drawable started the animation. |