# DynamicAnimation.OnAnimationUpdateListener

# DynamicAnimation.OnAnimationUpdateListener

Artifact:[androidx.dynamicanimation:dynamicanimation](https://developer.android.com/jetpack/androidx/releases/dynamicanimation)  
[View Source](https://cs.android.com/search?q=file:androidx/dynamicanimation/animation/DynamicAnimation.java+class:androidx.dynamicanimation.animation.DynamicAnimation.OnAnimationUpdateListener)  
Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/dynamicanimation#1.0.0)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/dynamicanimation/animation/DynamicAnimation.OnAnimationUpdateListener "View this page in Java")

<br />

```
interface DynamicAnimation.OnAnimationUpdateListener
```

<br />

*** ** * ** ***

Implementors of this interface can add themselves as update listeners to an`DynamicAnimation`instance to receive callbacks on every animation frame, after the current frame's values have been calculated for that`DynamicAnimation`.

## Summary

|                             ### Public functions                              |
|-------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [onAnimationUpdate](https://developer.android.com/reference/kotlin/androidx/dynamicanimation/animation/DynamicAnimation.OnAnimationUpdateListener#onAnimationUpdate(androidx.dynamicanimation.animation.DynamicAnimation,float,float))`(` ` animation: `[DynamicAnimation](https://developer.android.com/reference/kotlin/androidx/dynamicanimation/animation/DynamicAnimation)`!,` ` value: `[Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)`,` ` velocity: `[Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html) `)` Notifies the occurrence of another frame of the animation. |

## Public functions

### onAnimationUpdate

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

```
fun onAnimationUpdate(
    animation: DynamicAnimation!,
    value: Float,
    velocity: Float
): Unit
```

Notifies the occurrence of another frame of the animation.  

|                                                               Parameters                                                                |
|-----------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------|
| `animation: `[DynamicAnimation](https://developer.android.com/reference/kotlin/androidx/dynamicanimation/animation/DynamicAnimation)`!` | animation that the update listener is added to |
| `value: `[Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)                                                | the current value of the animation             |
| `velocity: `[Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)                                             | the current velocity of the animation          |