# ValueAnimator

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/ValueAnimator.java+class:androidx.core.animation.ValueAnimator) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/core#1.0.0)

*** ** * ** ***

<br />

```
class ValueAnimator : Animator
```

<br />

|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) |||
| ↳ | [androidx.core.animation.Animator](https://developer.android.com/reference/kotlin/androidx/core/animation/Animator) ||
|   | ↳ | [androidx.core.animation.ValueAnimator](https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator) |

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

There is a single timing pulse that all animations use. It runs in a custom handler to ensure that property changes happen on the UI thread.

By default, ValueAnimator uses non-linear time interpolation, via the `https://developer.android.com/reference/kotlin/androidx/core/animation/AccelerateDecelerateInterpolator` class, which accelerates into and decelerates out of an animation. This behavior can be changed by calling `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator#setInterpolator(androidx.core.animation.Interpolator)`.

Animators can be created from either code or resource files. Here is an example of a ValueAnimator resource file:

ValueAnimator also supports the use of a combination of `https://developer.android.com/reference/kotlin/androidx/core/animation/PropertyValuesHolder` and `https://developer.android.com/reference/kotlin/androidx/core/animation/Keyframe` resource tags to create a multi-step animation. Note that you can specify explicit fractional values (from 0 to 1) for each keyframe to determine when, in the overall duration, the animation should arrive at that value. Alternatively, you can leave the fractions off and the keyframes will be equally distributed within the total duration:

## Summary

| ### Constants |
|---|---|
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator#INFINITE() = -1` This value used used with the `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator#setRepeatCount(int)` property to repeat the animation indefinitely. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator#RESTART() = 1` When the animation reaches the end and `repeatCount` is INFINITE or a positive value, the animation restarts from the beginning. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator#REVERSE() = 2` When the animation reaches the end and `repeatCount` is INFINITE or a positive value, the animation reverses direction on every iteration. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator#ValueAnimator()()` Creates a new ValueAnimator object. |

| ### Public functions |
|---|---|
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator#areAnimatorsEnabled()()` Returns whether animators are currently enabled, system-wide. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator#cancel()()` Cancels the animation. |
| `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator` | `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator#clone()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator#end()()` Ends the animation. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator#getAnimatedFraction()()` Returns the current animation fraction, which is the elapsed/interpolated fraction used in the most recent frame update on the animation. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator#getAnimatedValue()()` The most recent value calculated by this `ValueAnimator` when there is just one property being animated. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?` | `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator#getAnimatedValue(java.lang.String)(propertyName: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` The most recent value calculated by this `ValueAnimator` for `propertyName`. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator#getCurrentPlayTime()()` Gets the current position of the animation in time, which is equal to the current time minus the time that the animation started. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator#getDuration()()` Gets the length of the animation. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator#getFrameDelay()()` The amount of time, in milliseconds, between each frame of the animation. |
| `https://developer.android.com/reference/kotlin/androidx/core/animation/Interpolator?` | `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator#getInterpolator()()` Returns the timing interpolator that this ValueAnimator uses. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator#getNameForTrace()()` Returns the name of this animator for debugging purposes. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator#getRepeatCount()()` Defines how many times the animation should repeat. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator#getRepeatMode()()` Defines what this animation should do when it reaches the end. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator#getStartDelay()()` The amount of time, in milliseconds, to delay starting the animation after `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator#start()` is called. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator#getTotalDuration()()` Gets the total duration of the animation, accounting for animation sequences, start delay, and repeating. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://developer.android.com/reference/kotlin/androidx/core/animation/PropertyValuesHolder!>` | `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator#getValues()()` Returns the values that this ValueAnimator animates between. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator#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/ValueAnimator#isStarted()()` Returns whether this Animator has been started and not yet ended. |
| `java-static https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator` | `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator#ofArgb(int...)(values: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html>)` Constructs and returns a ValueAnimator that animates between color values. |
| `java-static https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator` | `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator#ofFloat(float...)(values: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html>)` Constructs and returns a ValueAnimator that animates between float values. |
| `java-static https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator` | `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator#ofInt(int...)(values: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html>)` Constructs and returns a ValueAnimator that animates between int values. |
| `java-static https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator` | `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator#ofObject(androidx.core.animation.TypeEvaluator,java.lang.Object...)(evaluator: https://developer.android.com/reference/kotlin/androidx/core/animation/TypeEvaluator, values: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!>)` Constructs and returns a ValueAnimator that animates between Object values. |
| `java-static https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator` | `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator#ofPropertyValuesHolder(androidx.core.animation.PropertyValuesHolder...)(values: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://developer.android.com/reference/kotlin/androidx/core/animation/PropertyValuesHolder!>)` Constructs and returns a ValueAnimator that animates between the values specified in the PropertyValuesHolder objects. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator#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/ValueAnimator#resume()()` Resumes a paused animation, causing the animator to pick up where it left off when it was paused. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator#reverse()()` Plays the ValueAnimator in reverse. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator#setCurrentFraction(float)(fraction: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Sets the position of the animation to the specified fraction. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator#setCurrentPlayTime(long)(playTime: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Sets the position of the animation to the specified point in time. |
| `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator` | `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator#setDuration(long)(duration: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Sets the length of the animation. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator#setEvaluator(androidx.core.animation.TypeEvaluator)(value: https://developer.android.com/reference/kotlin/androidx/core/animation/TypeEvaluator)` The type evaluator to be used when calculating the animated values of this animation. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator#setFloatValues(float...)(values: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html>)` Sets float values that will be animated between. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator#setFrameDelay(long)(frameDelay: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` The amount of time, in milliseconds, between each frame of the animation. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator#setIntValues(int...)(values: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html>)` Sets int values that will be animated between. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator#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 this animation. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator#setNameForTrace(java.lang.String)(animationName: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` Sets a name for the animation to show up in the systrace. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator#setObjectValues(java.lang.Object...)(values: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!>)` Sets the values to animate between for this animation. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator#setRepeatCount(int)(value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Sets how many times the animation should be repeated. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator#setRepeatMode(int)(value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Defines what this animation should do when it reaches the end. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator#setStartDelay(long)(startDelay: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` The amount of time, in milliseconds, to delay starting the animation after `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator#start()` is called. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator#setValues(androidx.core.animation.PropertyValuesHolder...)(values: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://developer.android.com/reference/kotlin/androidx/core/animation/PropertyValuesHolder!>)` Sets the values, per property, being animated between. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator#start()()` Starts this animation. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator#toString()()` |

### Inherited Constants

From [androidx.core.animation.Animator](https://developer.android.com/reference/kotlin/androidx/core/animation/Animator) `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).

### Inherited functions

From [androidx.core.animation.Animator](https://developer.android.com/reference/kotlin/androidx/core/animation/Animator) `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/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator#isPaused()()`

Returns whether this animator is currently in a paused state.
`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#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.

## Constants

### INFINITE

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

```
const val INFINITE = -1: Int
```

This value used used with the `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator#setRepeatCount(int)` property to repeat the animation indefinitely.

### RESTART

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

```
const val RESTART = 1: Int
```

When the animation reaches the end and `repeatCount` is INFINITE or a positive value, the animation restarts from the beginning.

### REVERSE

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

```
const val REVERSE = 2: Int
```

When the animation reaches the end and `repeatCount` is INFINITE or a positive value, the animation reverses direction on every iteration.

## Public constructors

### ValueAnimator

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

```
ValueAnimator()
```

Creates a new ValueAnimator object. This default constructor is primarily for use internally; the factory methods which take parameters are more generally useful.

## Public functions

### areAnimatorsEnabled

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

```
java-static fun areAnimatorsEnabled(): Boolean
```

Returns whether animators are currently enabled, system-wide. By default, all animators are enabled. This can change if either the user sets a Developer Option to set the animator duration scale to 0 or by Battery Savery mode being enabled (which disables all animations).

Developers should not typically need to call this method, but should an app wish to show a different experience when animators are disabled, this return value can be used as a decider of which experience to offer.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | boolean Whether animators are currently enabled. The default value is `true`. |

### cancel

```
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

```
fun clone(): ValueAnimator
```

### end

```
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.

### getAnimatedFraction

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

```
fun getAnimatedFraction(): Float
```

Returns the current animation fraction, which is the elapsed/interpolated fraction used in the most recent frame update on the animation.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | Elapsed/interpolated fraction of the animation. |

### getAnimatedValue

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

```
fun getAnimatedValue(): Any
```

The most recent value calculated by this `ValueAnimator` when there is just one property being animated. This value is only sensible while the animation is running. The main purpose for this read-only property is to retrieve the value from the `ValueAnimator` during a call to `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator.AnimatorUpdateListener#onAnimationUpdate(androidx.core.animation.Animator)`, which is called during each animation frame, immediately after the value is calculated.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html` | animatedValue The value most recently calculated by this `ValueAnimator`for the single property being animated. If there are several properties being animated (specified by several PropertyValuesHolder objects in the constructor), this function returns the animated value for the first of those objects. |

### getAnimatedValue

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

```
fun getAnimatedValue(propertyName: String): Any?
```

The most recent value calculated by this `ValueAnimator` for `propertyName`. The main purpose for this read-only property is to retrieve the value from the `ValueAnimator` during a call to `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator.AnimatorUpdateListener#onAnimationUpdate(androidx.core.animation.Animator)`, which is called during each animation frame, immediately after the value is calculated.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?` | animatedValue The value most recently calculated for the named property by this `ValueAnimator`. |

### getCurrentPlayTime

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

```
fun getCurrentPlayTime(): Long
```

Gets the current position of the animation in time, which is equal to the current time minus the time that the animation started. An animation that is not yet started will return a value of zero, unless the animation has has its play time set via `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator#setCurrentPlayTime(long)` or `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator#setCurrentFraction(float)`, in which case it will return the time that was set.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The current position in time of the animation. |

### getDuration

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

Gets the length of the animation. The default duration is 300 milliseconds.

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

### getFrameDelay

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

```
java-static fun getFrameDelay(): Long
```

The amount of time, in milliseconds, between each frame of the animation. This is a requested time that the animation will attempt to honor, but the actual delay between frames may be different, depending on system load and capabilities. This is a static function because the same delay will be applied to all animations, since they are all run off of a single timing loop. The frame delay may be ignored when the animation system uses an external timing source, such as the display refresh rate (vsync), to govern animations. Note that this method should be called from the same thread that `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator#start()` is called in order to check the frame delay for that animation. A runtime exception will be thrown if the calling thread does not have a Looper.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | the requested time between frames, in milliseconds |

### getInterpolator

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

Returns the timing interpolator that this ValueAnimator uses.

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

### getNameForTrace

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

```
fun getNameForTrace(): String
```

Returns the name of this animator for debugging purposes.

### getRepeatCount

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

```
fun getRepeatCount(): Int
```

Defines how many times the animation should repeat. The default value is 0.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | the number of times the animation should repeat, or `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator#INFINITE()` |

### getRepeatMode

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

```
fun getRepeatMode(): Int
```

Defines what this animation should do when it reaches the end.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | either one of `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator#REVERSE()` or `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator#RESTART()` |

### getStartDelay

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

The amount of time, in milliseconds, to delay starting the animation after `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator#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

```
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. |

### getValues

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

```
fun getValues(): Array<PropertyValuesHolder!>
```

Returns the values that this ValueAnimator animates between. These values are stored in PropertyValuesHolder objects, even if the ValueAnimator was created with a simple list of value objects instead.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://developer.android.com/reference/kotlin/androidx/core/animation/PropertyValuesHolder!>` | PropertyValuesHolder\[\] An array of PropertyValuesHolder objects which hold the values, per property, that define the animation. |

### isRunning

```
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

```
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. |

### ofArgb

```
java-static fun ofArgb(values: IntArray<Int>): ValueAnimator
```

Constructs and returns a ValueAnimator that animates between color values. A single value implies that that value is the one being animated to. However, this is not typically useful in a ValueAnimator object because there is no way for the object to determine the starting value for the animation (unlike ObjectAnimator, which can derive that value from the target object and property being animated). Therefore, there should typically be two or more values.

| Parameters |
|---|---|
| `values: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html>` | A set of values that the animation will animate between over time. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator` | A ValueAnimator object that is set up to animate between the given values. |

### ofFloat

```
java-static fun ofFloat(values: FloatArray<Float>): ValueAnimator
```

Constructs and returns a ValueAnimator that animates between float values. A single value implies that that value is the one being animated to. However, this is not typically useful in a ValueAnimator object because there is no way for the object to determine the starting value for the animation (unlike ObjectAnimator, which can derive that value from the target object and property being animated). Therefore, there should typically be two or more values.

| Parameters |
|---|---|
| `values: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html>` | A set of values that the animation will animate between over time. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator` | A ValueAnimator object that is set up to animate between the given values. |

### ofInt

```
java-static fun ofInt(values: IntArray<Int>): ValueAnimator
```

Constructs and returns a ValueAnimator that animates between int values. A single value implies that that value is the one being animated to. However, this is not typically useful in a ValueAnimator object because there is no way for the object to determine the starting value for the animation (unlike ObjectAnimator, which can derive that value from the target object and property being animated). Therefore, there should typically be two or more values.

| Parameters |
|---|---|
| `values: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html>` | A set of values that the animation will animate between over time. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator` | A ValueAnimator object that is set up to animate between the given values. |

### ofObject

```
java-static fun ofObject(evaluator: TypeEvaluator, values: Array<Any!>): ValueAnimator
```

Constructs and returns a ValueAnimator that animates between Object values. A single value implies that that value is the one being animated to. However, this is not typically useful in a ValueAnimator object because there is no way for the object to determine the starting value for the animation (unlike ObjectAnimator, which can derive that value from the target object and property being animated). Therefore, there should typically be two or more values.

**Note:** The Object values are stored as references to the original objects, which means that changes to those objects after this method is called will affect the values on the animator. If the objects will be mutated externally after this method is called, callers should pass a copy of those objects instead.

Since ValueAnimator does not know how to animate between arbitrary Objects, this factory method also takes a TypeEvaluator object that the ValueAnimator will use to perform that interpolation.

| Parameters |
|---|---|
| `evaluator: https://developer.android.com/reference/kotlin/androidx/core/animation/TypeEvaluator` | A TypeEvaluator that will be called on each animation frame to provide the necessary interpolation between the Object values to derive the animated value. |
| `values: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!>` | A set of values that the animation will animate between over time. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator` | A ValueAnimator object that is set up to animate between the given values. |

### ofPropertyValuesHolder

```
java-static fun ofPropertyValuesHolder(values: Array<PropertyValuesHolder!>): ValueAnimator
```

Constructs and returns a ValueAnimator that animates between the values specified in the PropertyValuesHolder objects.

| Parameters |
|---|---|
| `values: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://developer.android.com/reference/kotlin/androidx/core/animation/PropertyValuesHolder!>` | A set of PropertyValuesHolder objects whose values will be animated between over time. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator` | A ValueAnimator object that is set up to animate between the given values. |

### pause

```
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` |   |

### resume

```
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` |   |

### reverse

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

```
fun reverse(): Unit
```

Plays the ValueAnimator in reverse. If the animation is already running, it will stop itself and play backwards from the point reached when reverse was called. If the animation is not currently running, then it will start from the end and play backwards. This behavior is only set for the current animation; future playing of the animation will use the default behavior of playing forward.

### setCurrentFraction

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

```
fun setCurrentFraction(fraction: Float): Unit
```

Sets the position of the animation to the specified fraction. This fraction should be between 0 and the total fraction of the animation, including any repetition. That is, a fraction of 0 will position the animation at the beginning, a value of 1 at the end, and a value of 2 at the end of a reversing animator that repeats once. If the animation has not yet been started, then it will not advance forward after it is set to this fraction; it will simply set the fraction to this value and perform any appropriate actions based on that fraction. If the animation is already running, then setCurrentFraction() will set the current fraction to this value and continue playing from that point. `https://developer.android.com/reference/kotlin/androidx/core/animation/Animator.AnimatorListener` events are not called due to changing the fraction; those events are only processed while the animation is running.

| Parameters |
|---|---|
| `fraction: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | The fraction to which the animation is advanced or rewound. Values outside the range of 0 to the maximum fraction for the animator will be clamped to the correct range. |

### setCurrentPlayTime

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

```
fun setCurrentPlayTime(playTime: Long): Unit
```

Sets the position of the animation to the specified point in time. This time should be between 0 and the total duration of the animation, including any repetition. If the animation has not yet been started, then it will not advance forward after it is set to this time; it will simply set the time to this value and perform any appropriate actions based on that time. If the animation is already running, then setCurrentPlayTime() will set the current playing time to this value and continue playing from that point.

| Parameters |
|---|---|
| `playTime: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The time, in milliseconds, to which the animation is advanced or rewound. |

### setDuration

```
fun setDuration(duration: Long): ValueAnimator
```

Sets the length of the animation. The default duration is 300 milliseconds.

| Parameters |
|---|---|
| `duration: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The length of the animation, in milliseconds. This value cannot be negative. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator` | ValueAnimator The object called with setDuration(). This return value makes it easier to compose statements together that construct and then set the duration, as in `ValueAnimator.ofInt(0, 10).setDuration(500).start()`. |

### setEvaluator

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

```
fun setEvaluator(value: TypeEvaluator): Unit
```

The type evaluator to be used when calculating the animated values of this animation. The system will automatically assign a float or int evaluator based on the type of `startValue` and `endValue` in the constructor. But if these values are not one of these primitive types, or if different evaluation is desired (such as is necessary with int values that represent colors), a custom evaluator needs to be assigned. For example, when running an animation on color values, the `https://developer.android.com/reference/kotlin/androidx/core/animation/ArgbEvaluator` should be used to get correct RGB color interpolation.

If this ValueAnimator has only one set of values being animated between, this evaluator will be used for that set. If there are several sets of values being animated, which is the case if PropertyValuesHolder objects were set on the ValueAnimator, then the evaluator is assigned just to the first PropertyValuesHolder object.

| Parameters |
|---|---|
| `value: https://developer.android.com/reference/kotlin/androidx/core/animation/TypeEvaluator` | the evaluator to be used this animation |

### setFloatValues

```
fun setFloatValues(values: FloatArray<Float>): Unit
```

Sets float values that will be animated between. A single value implies that that value is the one being animated to. However, this is not typically useful in a ValueAnimator object because there is no way for the object to determine the starting value for the animation (unlike ObjectAnimator, which can derive that value from the target object and property being animated). Therefore, there should typically be two or more values.

If there are already multiple sets of values defined for this ValueAnimator via more than one PropertyValuesHolder object, this method will set the values for the first of those objects.

| Parameters |
|---|---|
| `values: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html>` | A set of values that the animation will animate between over time. |

### setFrameDelay

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

```
java-static fun setFrameDelay(frameDelay: Long): Unit
```

The amount of time, in milliseconds, between each frame of the animation. This is a requested time that the animation will attempt to honor, but the actual delay between frames may be different, depending on system load and capabilities. This is a static function because the same delay will be applied to all animations, since they are all run off of a single timing loop. The frame delay may be ignored when the animation system uses an external timing source, such as the display refresh rate (vsync), to govern animations. Note that this method should be called from the same thread that `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator#start()` is called in order to have the new frame delay take effect on that animation. A runtime exception will be thrown if the calling thread does not have a Looper.

| Parameters |
|---|---|
| `frameDelay: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | the requested time between frames, in milliseconds |

### setIntValues

```
fun setIntValues(values: IntArray<Int>): Unit
```

Sets int values that will be animated between. A single value implies that that value is the one being animated to. However, this is not typically useful in a ValueAnimator object because there is no way for the object to determine the starting value for the animation (unlike ObjectAnimator, which can derive that value from the target object and property being animated). Therefore, there should typically be two or more values.

If there are already multiple sets of values defined for this ValueAnimator via more than one PropertyValuesHolder object, this method will set the values for the first of those objects.

| Parameters |
|---|---|
| `values: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html>` | A set of values that the animation will animate between over time. |

### setInterpolator

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

The interpolator used in calculating the elapsed fraction of this 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. A value of `null`will result in linear interpolation. |

### setNameForTrace

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

```
fun setNameForTrace(animationName: String): Unit
```

Sets a name for the animation to show up in the systrace. This makes a particular animation identifiable in the systrace.

| Parameters |
|---|---|
| `animationName: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | A name for the animation to make the instance identifiable in systrace |

### setObjectValues

```
fun setObjectValues(values: Array<Any!>): Unit
```

Sets the values to animate between for this animation. A single value implies that that value is the one being animated to. However, this is not typically useful in a ValueAnimator object because there is no way for the object to determine the starting value for the animation (unlike ObjectAnimator, which can derive that value from the target object and property being animated). Therefore, there should typically be two or more values.

**Note:** The Object values are stored as references to the original objects, which means that changes to those objects after this method is called will affect the values on the animator. If the objects will be mutated externally after this method is called, callers should pass a copy of those objects instead.

If there are already multiple sets of values defined for this ValueAnimator via more than one PropertyValuesHolder object, this method will set the values for the first of those objects.

There should be a TypeEvaluator set on the ValueAnimator that knows how to interpolate between these value objects. ValueAnimator only knows how to interpolate between the primitive types specified in the other setValues() methods.

| Parameters |
|---|---|
| `values: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!>` | The set of values to animate between. |

### setRepeatCount

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

```
fun setRepeatCount(value: Int): Unit
```

Sets how many times the animation should be repeated. If the repeat count is 0, the animation is never repeated. If the repeat count is greater than 0 or `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator#INFINITE()`, the repeat mode will be taken into account. The repeat count is 0 by default.

| Parameters |
|---|---|
| `value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | the number of times the animation should be repeated |

### setRepeatMode

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

```
fun setRepeatMode(value: Int): Unit
```

Defines what this animation should do when it reaches the end. This setting is applied only when the repeat count is either greater than 0 or `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator#INFINITE()`. Defaults to `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator#RESTART()`.

| Parameters |
|---|---|
| `value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator#RESTART()` or `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator#REVERSE()` |

### setStartDelay

```
fun setStartDelay(startDelay: Long): Unit
```

The amount of time, in milliseconds, to delay starting the animation after `https://developer.android.com/reference/kotlin/androidx/core/animation/ValueAnimator#start()` is called. Note that the start delay should always be non-negative. Any negative start delay will be clamped to 0 on N and above.

| Parameters |
|---|---|
| `startDelay: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The amount of the delay, in milliseconds |

### setValues

```
fun setValues(values: Array<PropertyValuesHolder!>): Unit
```

Sets the values, per property, being animated between. This function is called internally by the constructors of ValueAnimator that take a list of values. But a ValueAnimator can be constructed without values and this method can be called to set the values manually instead.

| Parameters |
|---|---|
| `values: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://developer.android.com/reference/kotlin/androidx/core/animation/PropertyValuesHolder!>` | The set of values, per property, being animated between. |

### start

```
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.

### toString

```
fun toString(): String
```