# Animatable2Compat.AnimationCallback

# Animatable2Compat.AnimationCallback

Artifact:[androidx.vectordrawable:vectordrawable-animated](https://developer.android.com/jetpack/androidx/releases/vectordrawable)  
[View Source](https://cs.android.com/search?q=file:androidx/vectordrawable/graphics/drawable/Animatable2Compat.java+class:androidx.vectordrawable.graphics.drawable.Animatable2Compat.AnimationCallback)  
Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/vectordrawable#1.0.0)

*** ** * ** ***

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

<br />

```
abstract class Animatable2Compat.AnimationCallback
```

<br />

*** ** * ** ***

Abstract class for animation callback. Used to notify animation events.

## Summary

|                                                                          ### Public constructors                                                                          |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [AnimationCallback](https://developer.android.com/reference/kotlin/androidx/vectordrawable/graphics/drawable/Animatable2Compat.AnimationCallback#AnimationCallback())`()` |

|                             ### Public functions                              |
|-------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [onAnimationEnd](https://developer.android.com/reference/kotlin/androidx/vectordrawable/graphics/drawable/Animatable2Compat.AnimationCallback#onAnimationEnd(android.graphics.drawable.Drawable))`(drawable: `[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)`)` Called when the animation ends.       |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [onAnimationStart](https://developer.android.com/reference/kotlin/androidx/vectordrawable/graphics/drawable/Animatable2Compat.AnimationCallback#onAnimationStart(android.graphics.drawable.Drawable))`(drawable: `[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)`)` Called when the animation starts. |

## Public constructors

### AnimationCallback

Added in 1.0.0  

```
AnimationCallback()
```  

## Public functions

### onAnimationEnd

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/vectordrawable#1.0.0)  

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

Called when the animation ends.  

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

### onAnimationStart

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/vectordrawable#1.0.0)  

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

Called when the animation starts.  

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