# Animator

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

*** ** * ** ***


```
abstract class Animator : Cloneable
```

<br />

Known direct subclasses [AnimatorSet](https://developer.android.com/reference/kotlin/androidx/core/animation/AnimatorSet), [ValueAnimator](https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator)

|---|---|
| `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/ValueAnimator` | This class provides a simple timing engine for running animations which calculate animated values and set them on target objects. |

Known indirect subclasses [ObjectAnimator](https://developer.android.com/reference/kotlin/androidx/core/animation/ObjectAnimator), [TimeAnimator](https://developer.android.com/reference/kotlin/androidx/core/animation/TimeAnimator)

|---|---|
| `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/TimeAnimator` | This class provides a simple callback mechanism to listeners that is synchronized with all other animators in the system. |

*** ** * ** ***

This is the superclass for classes which provide basic support for animations which can be started, ended, and have `AnimatorListeners` added to them.

## Summary

| ### Nested types |
|---|
| `interface https://developer.android.com/reference/kotlin/androidx/core/animation/Animator.AnimatorListener` An animation listener receives notifications from an animation. |
| `interface 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()`. |
| `interface 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`. |

| ### Constants |
|---|---|
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator#DURATION_INFINITE() = -1` The value used to indicate infinite duration (e.g. when Animators repeat infinitely). |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator#Animator()()` |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator#addListener(androidx.core.animation.Animator.AnimatorListener)(listener: https://developer.android.com/reference/kotlin/androidx/core/animation/Animator.AnimatorListener)` Adds a listener to the set of listeners that are sent events through the life of an animation, such as start, repeat, and end. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator#addPauseListener(androidx.core.animation.Animator.AnimatorPauseListener)(listener: https://developer.android.com/reference/kotlin/androidx/core/animation/Animator.AnimatorPauseListener)` Adds a pause listener to this animator. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator#addUpdateListener(androidx.core.animation.Animator.AnimatorUpdateListener)(listener: https://developer.android.com/reference/kotlin/androidx/core/animation/Animator.AnimatorUpdateListener)` Adds a listener to the set of listeners that are sent update events through the life of an animation. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator#cancel()()` Cancels the animation. |
| `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator` | `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator#clone()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator#end()()` Ends the animation. |
| `abstract https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator#getDuration()()` Gets the duration of the animation. |
| `https://developer.android.com/reference/kotlin/androidx/core/animation/Interpolator?` | `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator#getInterpolator()()` Returns the timing interpolator that this animation uses. |
| `abstract https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator#getStartDelay()()` The amount of time, in milliseconds, to delay processing the animation after `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator#start()` is called. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator#getTotalDuration()()` Gets the total duration of the animation, accounting for animation sequences, start delay, and repeating. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator#isPaused()()` Returns whether this animator is currently in a paused state. |
| `abstract https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator#isRunning()()` Returns whether this Animator is currently running (having been started and gone past any initial startDelay period and not yet ended). |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator#isStarted()()` Returns whether this Animator has been started and not yet ended. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator#pause()()` Pauses a running animation. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator#removeAllListeners()()` Removes all `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator#addListener(androidx.core.animation.Animator.AnimatorListener)` and `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator#addPauseListener(androidx.core.animation.Animator.AnimatorPauseListener)` from this object. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator#removeAllUpdateListeners()()` Removes all listeners from the set listening to frame updates for this animation. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator#removeListener(androidx.core.animation.Animator.AnimatorListener)(listener: https://developer.android.com/reference/kotlin/androidx/core/animation/Animator.AnimatorListener)` Removes a listener from the set listening to this animation. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator#removePauseListener(androidx.core.animation.Animator.AnimatorPauseListener)(listener: https://developer.android.com/reference/kotlin/androidx/core/animation/Animator.AnimatorPauseListener)` Removes a pause listener from the set listening to this animation. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator#removeUpdateListener(androidx.core.animation.Animator.AnimatorUpdateListener)(listener: https://developer.android.com/reference/kotlin/androidx/core/animation/Animator.AnimatorUpdateListener)` Removes a listener from the set listening to frame updates for this animation. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator#resume()()` Resumes a paused animation, causing the animator to pick up where it left off when it was paused. |
| `abstract https://developer.android.com/reference/kotlin/androidx/core/animation/Animator` | `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator#setDuration(long)(duration: @https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Sets the duration of the animation. |
| `abstract https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator#setInterpolator(androidx.core.animation.Interpolator)(value: https://developer.android.com/reference/kotlin/androidx/core/animation/Interpolator?)` The interpolator used in calculating the elapsed fraction of the animation. |
| `abstract https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator#setStartDelay(long)(startDelay: @https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` The amount of time, in milliseconds, to delay processing the animation after `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator#start()` is called. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator#setTarget(java.lang.Object)(target: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` Sets the target object whose property will be animated by this animation. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator#setupEndValues()()` This method tells the object to use appropriate information to extract ending values for the animation. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator#setupStartValues()()` This method tells the object to use appropriate information to extract starting values for the animation. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator#start()()` Starts this animation. |

## Constants

### DURATION_INFINITE

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

```
const val DURATION_INFINITE = -1: Long
```

The value used to indicate infinite duration (e.g. when Animators repeat infinitely).

## Public constructors

### Animator

Added in 1.0.0

```
Animator()
```

## Public functions

### addListener

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

```
fun addListener(listener: Animator.AnimatorListener): Unit
```

Adds a listener to the set of listeners that are sent events through the life of an animation, such as start, repeat, and end.

| Parameters |
|---|---|
| `listener: https://developer.android.com/reference/kotlin/androidx/core/animation/Animator.AnimatorListener` | the listener to be added to the current set of listeners for this animation. |

### addPauseListener

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

```
fun addPauseListener(listener: Animator.AnimatorPauseListener): Unit
```

Adds a pause listener to this animator.

| Parameters |
|---|---|
| `listener: https://developer.android.com/reference/kotlin/androidx/core/animation/Animator.AnimatorPauseListener` | the listener to be added to the current set of pause listeners for this animation. |

### addUpdateListener

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

```
fun addUpdateListener(listener: Animator.AnimatorUpdateListener): Unit
```

Adds a listener to the set of listeners that are sent update events through the life of an animation. This method is called on all listeners for every frame of the animation, after the values for the animation have been calculated.

| Parameters |
|---|---|
| `listener: https://developer.android.com/reference/kotlin/androidx/core/animation/Animator.AnimatorUpdateListener` | the listener to be added to the current set of listeners for this animation. |

### cancel

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

```
fun cancel(): Unit
```

Cancels the animation. Unlike `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator#end()`, `cancel()` causes the animation to stop in its tracks, sending an `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator.AnimatorListener#onAnimationCancel(androidx.core.animation.Animator)` to its listeners, followed by an `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator.AnimatorListener#onAnimationEnd(androidx.core.animation.Animator)` message.

This method must be called on the thread that is running the animation.

### clone

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

```
fun clone(): Animator
```

### end

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

```
fun end(): Unit
```

Ends the animation. This causes the animation to assign the end value of the property being animated, then calling the `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator.AnimatorListener#onAnimationEnd(androidx.core.animation.Animator)` method on its listeners.

This method must be called on the thread that is running the animation.

### getDuration

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

```
abstract fun getDuration(): Long
```

Gets the duration of the animation.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The length of the animation, in milliseconds. |

### getInterpolator

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

```
fun getInterpolator(): Interpolator?
```

Returns the timing interpolator that this animation uses.

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/core/animation/Interpolator?` | The timing interpolator for this animation. |

### getStartDelay

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

```
abstract fun getStartDelay(): Long
```

The amount of time, in milliseconds, to delay processing the animation after `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator#start()` is called.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | the number of milliseconds to delay running the animation |

### getTotalDuration

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

```
fun getTotalDuration(): Long
```

Gets the total duration of the animation, accounting for animation sequences, start delay, and repeating.

When the animation repeats infinite times, or when any of the child animators does (via `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator#setRepeatCount(int)`} to `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator#INFINITE()`), the total duration will be `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator#DURATION_INFINITE()`. Otherwise, the total duration is the sum of start delay and animation running time (i.e. duration of one iteration multiplied by the number of iterations).

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | Total time an animation takes to finish, starting from the time `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator#start()` is called. `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator#DURATION_INFINITE()` will be returned if the animation or any child animation repeats infinite times. |

### isPaused

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

```
fun isPaused(): Boolean
```

Returns whether this animator is currently in a paused state.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | True if the animator is currently paused, false otherwise. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator#pause()` |   |
| `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator#resume()` |   |

### isRunning

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

```
abstract fun isRunning(): Boolean
```

Returns whether this Animator is currently running (having been started and gone past any initial startDelay period and not yet ended).

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Whether the Animator is running. |

### isStarted

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

```
fun isStarted(): Boolean
```

Returns whether this Animator has been started and not yet ended. For reusable Animators (which most Animators are, apart from the one-shot animator produced by `https://developer.android.com/reference/android/view/ViewAnimationUtils.html#createCircularReveal(android.view.View, int, int, float, float)`), this state is a superset of `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator#isRunning()`, because an Animator with a nonzero `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator#getStartDelay()` will return true for `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator#isStarted()` during the delay phase, whereas `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator#isRunning()` will return true only after the delay phase is complete. Non-reusable animators will always return true after they have been started, because they cannot return to a non-started state.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Whether the Animator has been started and not yet ended. |

### pause

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

```
fun pause(): Unit
```

Pauses a running animation. This method should only be called on the same thread on which the animation was started. If the animation has not yet been `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator#isStarted()` or has since ended, then the call is ignored. Paused animations can be resumed by calling `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator#resume()`.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator#resume()` |   |
| `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator#isPaused()` |   |
| `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator.AnimatorPauseListener` |   |

### removeAllListeners

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

```
fun removeAllListeners(): Unit
```

Removes all `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator#addListener(androidx.core.animation.Animator.AnimatorListener)` and `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator#addPauseListener(androidx.core.animation.Animator.AnimatorPauseListener)` from this object.

### removeAllUpdateListeners

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

```
fun removeAllUpdateListeners(): Unit
```

Removes all listeners from the set listening to frame updates for this animation.

### removeListener

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

```
fun removeListener(listener: Animator.AnimatorListener): Unit
```

Removes a listener from the set listening to this animation.

| Parameters |
|---|---|
| `listener: https://developer.android.com/reference/kotlin/androidx/core/animation/Animator.AnimatorListener` | the listener to be removed from the current set of listeners for this animation. |

### removePauseListener

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

```
fun removePauseListener(listener: Animator.AnimatorPauseListener): Unit
```

Removes a pause listener from the set listening to this animation.

| Parameters |
|---|---|
| `listener: https://developer.android.com/reference/kotlin/androidx/core/animation/Animator.AnimatorPauseListener` | the listener to be removed from the current set of pause listeners for this animation. |

### removeUpdateListener

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

```
fun removeUpdateListener(listener: Animator.AnimatorUpdateListener): Unit
```

Removes a listener from the set listening to frame updates for this animation.

| Parameters |
|---|---|
| `listener: https://developer.android.com/reference/kotlin/androidx/core/animation/Animator.AnimatorUpdateListener` | the listener to be removed from the current set of update listeners for this animation. |

### resume

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

```
fun resume(): Unit
```

Resumes a paused animation, causing the animator to pick up where it left off when it was paused. This method should only be called on the same thread on which the animation was started. Calls to resume() on an animator that is not currently paused will be ignored.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator#pause()` |   |
| `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator#isPaused()` |   |
| `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator.AnimatorPauseListener` |   |

### setDuration

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

```
abstract fun setDuration(duration: @IntRange(from = 0) Long): Animator
```

Sets the duration of the animation.

| Parameters |
|---|---|
| `duration: @https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The length of the animation, in milliseconds. |

### setInterpolator

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

```
abstract fun setInterpolator(value: Interpolator?): Unit
```

The interpolator used in calculating the elapsed fraction of the animation. The interpolator determines whether the animation runs with linear or non-linear motion, such as acceleration and deceleration. The default value is `https://developer.android.com/reference/kotlin/androidx/core/animation/AccelerateDecelerateInterpolator`.

| Parameters |
|---|---|
| `value: https://developer.android.com/reference/kotlin/androidx/core/animation/Interpolator?` | the interpolator to be used by this animation, or `null` to use the default one. |

### setStartDelay

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

```
abstract fun setStartDelay(startDelay: @IntRange(from = 0) Long): Unit
```

The amount of time, in milliseconds, to delay processing the animation after `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator#start()` is called.

| Parameters |
|---|---|
| `startDelay: @https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The amount of the delay, in milliseconds |

### setTarget

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

```
fun setTarget(target: Any?): Unit
```

Sets the target object whose property will be animated by this animation. Not all subclasses operate on target objects (for example, `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator`, but this method is on the superclass for the convenience of dealing generically with those subclasses that do handle targets.

**Note:** The target is stored as a weak reference internally to avoid leaking resources by having animators directly reference old targets. Therefore, you should ensure that animator targets always have a hard reference elsewhere.

| Parameters |
|---|---|
| `target: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?` | The object being animated |

### setupEndValues

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

```
fun setupEndValues(): Unit
```

This method tells the object to use appropriate information to extract ending values for the animation. For example, a AnimatorSet object will pass this call to its child objects to tell them to set up the values. A ObjectAnimator object will use the information it has about its target object and PropertyValuesHolder objects to get the start values for its properties. A ValueAnimator object will ignore the request since it does not have enough information (such as a target object) to gather these values.

### setupStartValues

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

```
fun setupStartValues(): Unit
```

This method tells the object to use appropriate information to extract starting values for the animation. For example, a AnimatorSet object will pass this call to its child objects to tell them to set up the values. A ObjectAnimator object will use the information it has about its target object and PropertyValuesHolder objects to get the start values for its properties. A ValueAnimator object will ignore the request since it does not have enough information (such as a target object) to gather these values.

### start

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

```
fun start(): Unit
```

Starts this animation. If the animation has a nonzero startDelay, the animation will start running after that delay elapses. A non-delayed animation will have its initial value(s) set immediately, followed by calls to `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator.AnimatorListener#onAnimationStart(androidx.core.animation.Animator)` for any listeners of this animator.

The animation started by calling this method will be run on the thread that called this method. This thread should have a Looper on it (a runtime exception will be thrown if this is not the case). Also, if the animation will animate properties of objects in the view hierarchy, then the calling thread should be the UI thread for that view hierarchy.