# SeekableAnimatedVectorDrawable.AnimationCallback

# SeekableAnimatedVectorDrawable.AnimationCallback

Artifact:[androidx.vectordrawable:vectordrawable-seekable](https://developer.android.com/jetpack/androidx/releases/vectordrawable)  
[View Source](https://cs.android.com/search?q=file:androidx/vectordrawable/graphics/drawable/SeekableAnimatedVectorDrawable.java+class:androidx.vectordrawable.graphics.drawable.SeekableAnimatedVectorDrawable.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/SeekableAnimatedVectorDrawable.AnimationCallback "View this page in Java")

<br />

```
abstract class SeekableAnimatedVectorDrawable.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/SeekableAnimatedVectorDrawable.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/SeekableAnimatedVectorDrawable.AnimationCallback#onAnimationEnd(androidx.vectordrawable.graphics.drawable.SeekableAnimatedVectorDrawable))`(drawable: `[SeekableAnimatedVectorDrawable](https://developer.android.com/reference/kotlin/androidx/vectordrawable/graphics/drawable/SeekableAnimatedVectorDrawable)`)` Called when the animation ends.                             |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [onAnimationPause](https://developer.android.com/reference/kotlin/androidx/vectordrawable/graphics/drawable/SeekableAnimatedVectorDrawable.AnimationCallback#onAnimationPause(androidx.vectordrawable.graphics.drawable.SeekableAnimatedVectorDrawable))`(drawable: `[SeekableAnimatedVectorDrawable](https://developer.android.com/reference/kotlin/androidx/vectordrawable/graphics/drawable/SeekableAnimatedVectorDrawable)`)` Called when the animation is paused.                    |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [onAnimationResume](https://developer.android.com/reference/kotlin/androidx/vectordrawable/graphics/drawable/SeekableAnimatedVectorDrawable.AnimationCallback#onAnimationResume(androidx.vectordrawable.graphics.drawable.SeekableAnimatedVectorDrawable))`(drawable: `[SeekableAnimatedVectorDrawable](https://developer.android.com/reference/kotlin/androidx/vectordrawable/graphics/drawable/SeekableAnimatedVectorDrawable)`)` Called when the animation is resumed.                 |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [onAnimationStart](https://developer.android.com/reference/kotlin/androidx/vectordrawable/graphics/drawable/SeekableAnimatedVectorDrawable.AnimationCallback#onAnimationStart(androidx.vectordrawable.graphics.drawable.SeekableAnimatedVectorDrawable))`(drawable: `[SeekableAnimatedVectorDrawable](https://developer.android.com/reference/kotlin/androidx/vectordrawable/graphics/drawable/SeekableAnimatedVectorDrawable)`)` Called when the animation starts.                       |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [onAnimationUpdate](https://developer.android.com/reference/kotlin/androidx/vectordrawable/graphics/drawable/SeekableAnimatedVectorDrawable.AnimationCallback#onAnimationUpdate(androidx.vectordrawable.graphics.drawable.SeekableAnimatedVectorDrawable))`(drawable: `[SeekableAnimatedVectorDrawable](https://developer.android.com/reference/kotlin/androidx/vectordrawable/graphics/drawable/SeekableAnimatedVectorDrawable)`)` Called on every frame while the animation is running. |

## 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: SeekableAnimatedVectorDrawable): Unit
```

Called when the animation ends.  

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

### onAnimationPause

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

```
fun onAnimationPause(drawable: SeekableAnimatedVectorDrawable): Unit
```

Called when the animation is paused.  

|                                                                              Parameters                                                                               |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------|
| `drawable: `[SeekableAnimatedVectorDrawable](https://developer.android.com/reference/kotlin/androidx/vectordrawable/graphics/drawable/SeekableAnimatedVectorDrawable) | The drawable. |

### onAnimationResume

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

```
fun onAnimationResume(drawable: SeekableAnimatedVectorDrawable): Unit
```

Called when the animation is resumed.  

|                                                                              Parameters                                                                               |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------|
| `drawable: `[SeekableAnimatedVectorDrawable](https://developer.android.com/reference/kotlin/androidx/vectordrawable/graphics/drawable/SeekableAnimatedVectorDrawable) | The drawable. |

### onAnimationStart

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

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

Called when the animation starts.  

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

### onAnimationUpdate

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

```
fun onAnimationUpdate(drawable: SeekableAnimatedVectorDrawable): Unit
```

Called on every frame while the animation is running. The implementation must not register or unregister any[AnimationCallback](https://developer.android.com/reference/kotlin/androidx/vectordrawable/graphics/drawable/SeekableAnimatedVectorDrawable.AnimationCallback)here.  

|                                                                              Parameters                                                                               |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------|
| `drawable: `[SeekableAnimatedVectorDrawable](https://developer.android.com/reference/kotlin/androidx/vectordrawable/graphics/drawable/SeekableAnimatedVectorDrawable) | The drawable. |