# AnimatorKt

Added in 1.1.0

*** ** * ** ***


```
public final class AnimatorKt
```

<br />

*** ** * ** ***

## Summary

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

## Public methods

### 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)

```
public static final @NonNull Animator.AnimatorListener addListener(
    @NonNull Animator receiver,
    @NonNull Function1<@NonNull Animator, Unit> onEnd,
    @NonNull Function1<@NonNull Animator, Unit> onStart,
    @NonNull Function1<@NonNull Animator, Unit> onCancel,
    @NonNull Function1<@NonNull Animator, Unit> onRepeat
)
```

Add a listener to this Animator using the provided actions.

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull 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 |

### 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)

```
public static final @NonNull Animator.AnimatorPauseListener addPauseListener(
    @NonNull Animator receiver,
    @NonNull Function1<@NonNull Animator, Unit> onResume,
    @NonNull Function1<@NonNull Animator, Unit> onPause
)
```

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

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull 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 |

### 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)

```
public static final @NonNull Animator.AnimatorListener doOnCancel(
    @NonNull Animator receiver,
    @NonNull Function1<@NonNull Animator, Unit> action
)
```

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

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull 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()` |   |

### 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)

```
public static final @NonNull Animator.AnimatorListener doOnEnd(
    @NonNull Animator receiver,
    @NonNull Function1<@NonNull Animator, Unit> action
)
```

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

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull 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()` |   |

### 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)

```
public static final @NonNull Animator.AnimatorPauseListener doOnPause(
    @NonNull Animator receiver,
    @NonNull Function1<@NonNull Animator, Unit> action
)
```

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

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull 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()` |   |

### 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)

```
public static final @NonNull Animator.AnimatorListener doOnRepeat(
    @NonNull Animator receiver,
    @NonNull Function1<@NonNull Animator, Unit> action
)
```

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

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull 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 |

### 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)

```
public static final @NonNull Animator.AnimatorPauseListener doOnResume(
    @NonNull Animator receiver,
    @NonNull Function1<@NonNull Animator, Unit> action
)
```

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

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull 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()` |   |

### 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)

```
public static final @NonNull Animator.AnimatorListener doOnStart(
    @NonNull Animator receiver,
    @NonNull Function1<@NonNull Animator, Unit> action
)
```

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

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull 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()` |   |