# androidx.core.animation

*** ** * ** ***

## Interfaces

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator.AnimatorListener` | An animation listener receives notifications from an animation. |
| `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator.AnimatorPauseListener` | A pause listener receives notifications from an animation when the animation is `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator#pause()` or `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator#resume()`. |
| `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator.AnimatorUpdateListener` | Implementors of this interface can add themselves as update listeners to an `ValueAnimator` instance to receive callbacks on every animation frame, after the current frame's values have been calculated for that `ValueAnimator`. |
| `https://developer.android.com/reference/kotlin/androidx/core/animation/Interpolator` | An interpolator defines the rate of change of an animation. |
| `https://developer.android.com/reference/kotlin/androidx/core/animation/TimeAnimator.TimeListener` | Implementors of this interface can set themselves as update listeners to a `TimeAnimator` instance to receive callbacks on every animation frame to receive the total time since the animator started and the delta time since the last frame. |
| `https://developer.android.com/reference/kotlin/androidx/core/animation/TypeEvaluator` | Interface for use with the `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator#setEvaluator(androidx.core.animation.TypeEvaluator)` function. |

## Classes

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/core/animation/AccelerateDecelerateInterpolator` | An interpolator where the rate of change starts and ends slowly but accelerates through the middle. |
| `https://developer.android.com/reference/kotlin/androidx/core/animation/AccelerateInterpolator` | An interpolator where the rate of change starts out slowly and then accelerates. |
| `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator` | This is the superclass for classes which provide basic support for animations which can be started, ended, and have `AnimatorListeners` added to them. |
| `https://developer.android.com/reference/kotlin/androidx/core/animation/AnimatorInflater` | This class is used to instantiate animator XML files into Animator objects. |
| `https://developer.android.com/reference/kotlin/androidx/core/animation/AnimatorListenerAdapter` | This adapter class provides empty implementations of the methods from `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator.AnimatorListener`. |
| `https://developer.android.com/reference/kotlin/androidx/core/animation/AnimatorSet` | This class plays a set of `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator` objects in the specified order. |
| `https://developer.android.com/reference/kotlin/androidx/core/animation/AnimatorSet.Builder` | The `Builder` object is a utility class to facilitate adding animations to a `AnimatorSet` along with the relationships between the various animations. |
| `https://developer.android.com/reference/kotlin/androidx/core/animation/AnimatorTestRule` | JUnit `https://junit.org/junit4/javadoc/latest/org/junit/rules/TestRule.html` that can be used to run `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator`s without actually waiting for the duration of the animation. |
| `https://developer.android.com/reference/kotlin/androidx/core/animation/AnticipateInterpolator` | An interpolator where the change starts backward then flings forward. |
| `https://developer.android.com/reference/kotlin/androidx/core/animation/AnticipateOvershootInterpolator` | An interpolator where the change starts backward then flings forward and overshoots the target value and finally goes back to the final value. |
| `https://developer.android.com/reference/kotlin/androidx/core/animation/ArgbEvaluator` | This evaluator can be used to perform type interpolation between integer values that represent ARGB colors. |
| `https://developer.android.com/reference/kotlin/androidx/core/animation/BidirectionalTypeConverter` | Abstract base class used convert type T to another type V and back again. |
| `https://developer.android.com/reference/kotlin/androidx/core/animation/BounceInterpolator` | An interpolator where the change bounces at the end. |
| `https://developer.android.com/reference/kotlin/androidx/core/animation/CycleInterpolator` | Repeats the animation for a specified number of cycles. |
| `https://developer.android.com/reference/kotlin/androidx/core/animation/DecelerateInterpolator` | An interpolator where the rate of change starts out quickly and then decelerates. |
| `https://developer.android.com/reference/kotlin/androidx/core/animation/FloatArrayEvaluator` | This evaluator can be used to perform type interpolation between `float[]` values. |
| `https://developer.android.com/reference/kotlin/androidx/core/animation/FloatEvaluator` | This evaluator can be used to perform type interpolation between `float` values. |
| `https://developer.android.com/reference/kotlin/androidx/core/animation/FloatProperty` | An implementation of `https://developer.android.com/reference/android/util/Property.html` to be used specifically with fields of type `float`. |
| `https://developer.android.com/reference/kotlin/androidx/core/animation/IntArrayEvaluator` | This evaluator can be used to perform type interpolation between `int[]` values. |
| `https://developer.android.com/reference/kotlin/androidx/core/animation/IntEvaluator` | This evaluator can be used to perform type interpolation between `int` values. |
| `https://developer.android.com/reference/kotlin/androidx/core/animation/IntProperty` | An implementation of `https://developer.android.com/reference/android/util/Property.html` to be used specifically with fields of type `int`. |
| `https://developer.android.com/reference/kotlin/androidx/core/animation/Keyframe` | This class holds a time/value pair for an animation. |
| `https://developer.android.com/reference/kotlin/androidx/core/animation/LinearInterpolator` | An interpolator where the rate of change is constant |
| `https://developer.android.com/reference/kotlin/androidx/core/animation/ObjectAnimator` | This subclass of `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator` provides support for animating properties on target objects. |
| `https://developer.android.com/reference/kotlin/androidx/core/animation/OvershootInterpolator` | An interpolator where the change flings forward and overshoots the last value then comes back. |
| `https://developer.android.com/reference/kotlin/androidx/core/animation/PathInterpolator` | An interpolator that can traverse a Path that extends from `Point``(0, 0)` to `(1, 1)`. |
| `https://developer.android.com/reference/kotlin/androidx/core/animation/PointFEvaluator` | This evaluator can be used to perform type interpolation between `PointF` values. |
| `https://developer.android.com/reference/kotlin/androidx/core/animation/PropertyValuesHolder` | This class holds information about a property and the values that that property should take on during an animation. |
| `https://developer.android.com/reference/kotlin/androidx/core/animation/RectEvaluator` | This evaluator can be used to perform type interpolation between `Rect` values. |
| `https://developer.android.com/reference/kotlin/androidx/core/animation/TimeAnimator` | This class provides a simple callback mechanism to listeners that is synchronized with all other animators in the system. |
| `https://developer.android.com/reference/kotlin/androidx/core/animation/TypeConverter` | Abstract base class used convert type T to another type V. |
| `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator` | This class provides a simple timing engine for running animations which calculate animated values and set them on target objects. |

## Extension functions summary

|---|---|
| `inline https://developer.android.com/reference/android/animation/Animator.AnimatorListener.html` | `https://developer.android.com/reference/android/animation/Animator.html.https://developer.android.com/reference/kotlin/androidx/core/animation/package-summary#(android.animation.Animator).addListener(kotlin.Function1,kotlin.Function1,kotlin.Function1,kotlin.Function1)( crossinline onEnd: (animator: https://developer.android.com/reference/android/animation/Animator.html) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html, crossinline onStart: (animator: https://developer.android.com/reference/android/animation/Animator.html) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html, crossinline onCancel: (animator: https://developer.android.com/reference/android/animation/Animator.html) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html, crossinline onRepeat: (animator: https://developer.android.com/reference/android/animation/Animator.html) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html )` Add a listener to this Animator using the provided actions. |
| `https://developer.android.com/reference/android/animation/Animator.AnimatorPauseListener.html` | `https://developer.android.com/reference/android/animation/Animator.html.https://developer.android.com/reference/kotlin/androidx/core/animation/package-summary#(android.animation.Animator).addPauseListener(kotlin.Function1,kotlin.Function1)( onResume: (animator: https://developer.android.com/reference/android/animation/Animator.html) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html, onPause: (animator: https://developer.android.com/reference/android/animation/Animator.html) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html )` Add a pause and resume listener to this Animator using the provided actions. |
| `inline https://developer.android.com/reference/android/animation/Animator.AnimatorListener.html` | `https://developer.android.com/reference/android/animation/Animator.html.https://developer.android.com/reference/kotlin/androidx/core/animation/package-summary#(android.animation.Animator).doOnCancel(kotlin.Function1)(crossinline action: (animator: https://developer.android.com/reference/android/animation/Animator.html) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)` Add an action which will be invoked when the animation has been cancelled. |
| `inline https://developer.android.com/reference/android/animation/Animator.AnimatorListener.html` | `https://developer.android.com/reference/android/animation/Animator.html.https://developer.android.com/reference/kotlin/androidx/core/animation/package-summary#(android.animation.Animator).doOnEnd(kotlin.Function1)(crossinline action: (animator: https://developer.android.com/reference/android/animation/Animator.html) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)` Add an action which will be invoked when the animation has ended. |
| `https://developer.android.com/reference/android/animation/Animator.AnimatorPauseListener.html` | `https://developer.android.com/reference/android/animation/Animator.html.https://developer.android.com/reference/kotlin/androidx/core/animation/package-summary#(android.animation.Animator).doOnPause(kotlin.Function1)(action: (animator: https://developer.android.com/reference/android/animation/Animator.html) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)` Add an action which will be invoked when the animation has been paused. |
| `inline https://developer.android.com/reference/android/animation/Animator.AnimatorListener.html` | `https://developer.android.com/reference/android/animation/Animator.html.https://developer.android.com/reference/kotlin/androidx/core/animation/package-summary#(android.animation.Animator).doOnRepeat(kotlin.Function1)(crossinline action: (animator: https://developer.android.com/reference/android/animation/Animator.html) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)` Add an action which will be invoked when the animation has repeated. |
| `https://developer.android.com/reference/android/animation/Animator.AnimatorPauseListener.html` | `https://developer.android.com/reference/android/animation/Animator.html.https://developer.android.com/reference/kotlin/androidx/core/animation/package-summary#(android.animation.Animator).doOnResume(kotlin.Function1)(action: (animator: https://developer.android.com/reference/android/animation/Animator.html) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)` Add an action which will be invoked when the animation has resumed after a pause. |
| `inline https://developer.android.com/reference/android/animation/Animator.AnimatorListener.html` | `https://developer.android.com/reference/android/animation/Animator.html.https://developer.android.com/reference/kotlin/androidx/core/animation/package-summary#(android.animation.Animator).doOnStart(kotlin.Function1)(crossinline action: (animator: https://developer.android.com/reference/android/animation/Animator.html) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)` Add an action which will be invoked when the animation has started. |

## Extension functions

### Animator.addListener

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/animation/Animator.kt+function:addListener) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
inline fun Animator.addListener(
    crossinline onEnd: (animator: Animator) -> Unit = {},
    crossinline onStart: (animator: Animator) -> Unit = {},
    crossinline onCancel: (animator: Animator) -> Unit = {},
    crossinline onRepeat: (animator: Animator) -> Unit = {}
): Animator.AnimatorListener
```

Add a listener to this Animator using the provided actions.

| Returns |
|---|---|
| `https://developer.android.com/reference/android/animation/Animator.AnimatorListener.html` | the `https://developer.android.com/reference/android/animation/Animator.AnimatorListener.html` added to the Animator |

### Animator.addPauseListener

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/animation/Animator.kt+function:addPauseListener) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
fun Animator.addPauseListener(
    onResume: (animator: Animator) -> Unit = {},
    onPause: (animator: Animator) -> Unit = {}
): Animator.AnimatorPauseListener
```

Add a pause and resume listener to this Animator using the provided actions.

| Returns |
|---|---|
| `https://developer.android.com/reference/android/animation/Animator.AnimatorPauseListener.html` | the `https://developer.android.com/reference/android/animation/Animator.AnimatorPauseListener.html` added to the Animator |

### Animator.doOnCancel

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/animation/Animator.kt+function:doOnCancel) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
inline fun Animator.doOnCancel(crossinline action: (animator: Animator) -> Unit): Animator.AnimatorListener
```

Add an action which will be invoked when the animation has been cancelled.

| Returns |
|---|---|
| `https://developer.android.com/reference/android/animation/Animator.AnimatorListener.html` | the `https://developer.android.com/reference/android/animation/Animator.AnimatorListener.html` added to the Animator |

| See also |
|---|---|
| `https://developer.android.com/reference/android/animation/Animator.html#cancel()` |   |

### Animator.doOnEnd

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/animation/Animator.kt+function:doOnEnd) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
inline fun Animator.doOnEnd(crossinline action: (animator: Animator) -> Unit): Animator.AnimatorListener
```

Add an action which will be invoked when the animation has ended.

| Returns |
|---|---|
| `https://developer.android.com/reference/android/animation/Animator.AnimatorListener.html` | the `https://developer.android.com/reference/android/animation/Animator.AnimatorListener.html` added to the Animator |

| See also |
|---|---|
| `https://developer.android.com/reference/android/animation/Animator.html#end()` |   |

### Animator.doOnPause

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/animation/Animator.kt+function:doOnPause) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
fun Animator.doOnPause(action: (animator: Animator) -> Unit): Animator.AnimatorPauseListener
```

Add an action which will be invoked when the animation has been paused.

| Returns |
|---|---|
| `https://developer.android.com/reference/android/animation/Animator.AnimatorPauseListener.html` | the `https://developer.android.com/reference/android/animation/Animator.AnimatorPauseListener.html` added to the Animator |

| See also |
|---|---|
| `https://developer.android.com/reference/android/animation/Animator.html#pause()` |   |

### Animator.doOnRepeat

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/animation/Animator.kt+function:doOnRepeat) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
inline fun Animator.doOnRepeat(crossinline action: (animator: Animator) -> Unit): Animator.AnimatorListener
```

Add an action which will be invoked when the animation has repeated.

| Returns |
|---|---|
| `https://developer.android.com/reference/android/animation/Animator.AnimatorListener.html` | the `https://developer.android.com/reference/android/animation/Animator.AnimatorListener.html` added to the Animator |

### Animator.doOnResume

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/animation/Animator.kt+function:doOnResume) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
fun Animator.doOnResume(action: (animator: Animator) -> Unit): Animator.AnimatorPauseListener
```

Add an action which will be invoked when the animation has resumed after a pause.

| Returns |
|---|---|
| `https://developer.android.com/reference/android/animation/Animator.AnimatorPauseListener.html` | the `https://developer.android.com/reference/android/animation/Animator.AnimatorPauseListener.html` added to the Animator |

| See also |
|---|---|
| `https://developer.android.com/reference/android/animation/Animator.html#resume()` |   |

### Animator.doOnStart

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/animation/Animator.kt+function:doOnStart) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
inline fun Animator.doOnStart(crossinline action: (animator: Animator) -> Unit): Animator.AnimatorListener
```

Add an action which will be invoked when the animation has started.

| Returns |
|---|---|
| `https://developer.android.com/reference/android/animation/Animator.AnimatorListener.html` | the `https://developer.android.com/reference/android/animation/Animator.AnimatorListener.html` added to the Animator |

| See also |
|---|---|
| `https://developer.android.com/reference/android/animation/Animator.html#start()` |   |