Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Nested Classes](https://developer.android.com/reference/android/animation/ValueAnimator#nestedclasses) \| [Constants](https://developer.android.com/reference/android/animation/ValueAnimator#constants) \| [Inherited Constants](https://developer.android.com/reference/android/animation/ValueAnimator#inhconstants) \| [Ctors](https://developer.android.com/reference/android/animation/ValueAnimator#pubctors) \| [Methods](https://developer.android.com/reference/android/animation/ValueAnimator#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/animation/ValueAnimator#inhmethods)

# ValueAnimator

*** ** * ** ***

` public class ValueAnimator `   
` ` ` extends https://developer.android.com/reference/android/animation/Animator ` ` `

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) |||
| ↳ | [android.animation.Animator](https://developer.android.com/reference/android/animation/Animator) ||
|   | ↳ | android.animation.ValueAnimator |

Known direct subclasses [ObjectAnimator](https://developer.android.com/reference/android/animation/ObjectAnimator), [TimeAnimator](https://developer.android.com/reference/android/animation/TimeAnimator) [ObjectAnimator](https://developer.android.com/reference/android/animation/ObjectAnimator) This subclass of `https://developer.android.com/reference/android/animation/ValueAnimator` provides support for animating properties on target objects. [TimeAnimator](https://developer.android.com/reference/android/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/android/view/animation/AccelerateDecelerateInterpolator` class, which accelerates into and decelerates out of an animation. This behavior can be changed by calling `https://developer.android.com/reference/android/animation/ValueAnimator#setInterpolator(android.animation.TimeInterpolator)`.

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

```
<animator xmlns:android="http://schemas.android.com/apk/res/android"
    android:duration="1000"
    android:valueFrom="1"
    android:valueTo="0"
    android:valueType="floatType"
    android:repeatCount="1"
    android:repeatMode="reverse"/>
```

Starting from API 23, it is also possible to use a combination of `https://developer.android.com/reference/android/animation/PropertyValuesHolder` and `https://developer.android.com/reference/android/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:

```
<animator xmlns:android="http://schemas.android.com/apk/res/android"
          android:duration="1000"
          android:repeatCount="1"
          android:repeatMode="reverse">
    <propertyValuesHolder>
        <keyframe android:fraction="0" android:value="1"/>
        <keyframe android:fraction=".2" android:value=".4"/>
        <keyframe android:fraction="1" android:value="0"/>
    </propertyValuesHolder>
</animator>
```

### Developer Guides

For more information about animating with `ValueAnimator`, read the [Property Animation](https://developer.android.com/guide/topics/graphics/prop-animation#value-animator) developer guide.

<br />

## Summary

| ### Nested classes ||
|---|---|
| ` interface` | `https://developer.android.com/reference/android/animation/ValueAnimator.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`. |
| ` interface` | `https://developer.android.com/reference/android/animation/ValueAnimator.DurationScaleChangeListener` Listener interface for the system-wide scaling factor for Animator-based animations. |

| ### Constants ||
|---|---|
| `int` | `https://developer.android.com/reference/android/animation/ValueAnimator#INFINITE` This value used used with the `https://developer.android.com/reference/android/animation/ValueAnimator#setRepeatCount(int)` property to repeat the animation indefinitely. |
| `int` | `https://developer.android.com/reference/android/animation/ValueAnimator#RESTART` When the animation reaches the end and `repeatCount` is INFINITE or a positive value, the animation restarts from the beginning. |
| `int` | `https://developer.android.com/reference/android/animation/ValueAnimator#REVERSE` When the animation reaches the end and `repeatCount` is INFINITE or a positive value, the animation reverses direction on every iteration. |

### Inherited constants

From class `https://developer.android.com/reference/android/animation/Animator` `long` `https://developer.android.com/reference/android/animation/Animator#DURATION_INFINITE`

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

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

| ### Public methods ||
|---|---|
| ` void` | ` https://developer.android.com/reference/android/animation/ValueAnimator#addUpdateListener(android.animation.ValueAnimator.AnimatorUpdateListener)(https://developer.android.com/reference/android/animation/ValueAnimator.AnimatorUpdateListener listener) ` Adds a listener to the set of listeners that are sent update events through the life of an animation. |
| ` static boolean` | ` https://developer.android.com/reference/android/animation/ValueAnimator#areAnimatorsEnabled()() ` Returns whether animators are currently enabled, system-wide. |
| ` void` | ` https://developer.android.com/reference/android/animation/ValueAnimator#cancel()() ` Cancels the animation. |
| ` https://developer.android.com/reference/android/animation/ValueAnimator` | ` https://developer.android.com/reference/android/animation/ValueAnimator#clone()() ` Creates and returns a copy of this object. |
| ` void` | ` https://developer.android.com/reference/android/animation/ValueAnimator#end()() ` Ends the animation. |
| ` float` | ` https://developer.android.com/reference/android/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://developer.android.com/reference/java/lang/Object` | ` https://developer.android.com/reference/android/animation/ValueAnimator#getAnimatedValue()() ` The most recent value calculated by this `ValueAnimator` when there is just one property being animated. |
| ` https://developer.android.com/reference/java/lang/Object` | ` https://developer.android.com/reference/android/animation/ValueAnimator#getAnimatedValue(java.lang.String)(https://developer.android.com/reference/java/lang/String propertyName) ` The most recent value calculated by this `ValueAnimator` for `propertyName`. |
| ` long` | ` https://developer.android.com/reference/android/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. |
| ` long` | ` https://developer.android.com/reference/android/animation/ValueAnimator#getDuration()() ` Gets the length of the animation. |
| ` static float` | ` https://developer.android.com/reference/android/animation/ValueAnimator#getDurationScale()() ` Returns the system-wide scaling factor for Animator-based animations. |
| ` static long` | ` https://developer.android.com/reference/android/animation/ValueAnimator#getFrameDelay()() ` The amount of time, in milliseconds, between each frame of the animation. |
| ` https://developer.android.com/reference/android/animation/TimeInterpolator` | ` https://developer.android.com/reference/android/animation/ValueAnimator#getInterpolator()() ` Returns the timing interpolator that this ValueAnimator uses. |
| ` int` | ` https://developer.android.com/reference/android/animation/ValueAnimator#getRepeatCount()() ` Defines how many times the animation should repeat. |
| ` int` | ` https://developer.android.com/reference/android/animation/ValueAnimator#getRepeatMode()() ` Defines what this animation should do when it reaches the end. |
| ` long` | ` https://developer.android.com/reference/android/animation/ValueAnimator#getStartDelay()() ` The amount of time, in milliseconds, to delay starting the animation after `https://developer.android.com/reference/android/animation/ValueAnimator#start()` is called. |
| ` long` | ` https://developer.android.com/reference/android/animation/ValueAnimator#getTotalDuration()() ` Gets the total duration of the animation, accounting for animation sequences, start delay, and repeating. |
| ` https://developer.android.com/reference/android/animation/PropertyValuesHolder` | ` https://developer.android.com/reference/android/animation/ValueAnimator#getValues()() ` Returns the values that this ValueAnimator animates between. |
| ` boolean` | ` https://developer.android.com/reference/android/animation/ValueAnimator#isRunning()() ` Returns whether this Animator is currently running (having been started and gone past any initial startDelay period and not yet ended). |
| ` boolean` | ` https://developer.android.com/reference/android/animation/ValueAnimator#isStarted()() ` Returns whether this Animator has been started and not yet ended. |
| ` static https://developer.android.com/reference/android/animation/ValueAnimator` | ` https://developer.android.com/reference/android/animation/ValueAnimator#ofArgb(int[])(int... values) ` Constructs and returns a ValueAnimator that animates between color values. |
| ` static https://developer.android.com/reference/android/animation/ValueAnimator` | ` https://developer.android.com/reference/android/animation/ValueAnimator#ofFloat(float[])(float... values) ` Constructs and returns a ValueAnimator that animates between float values. |
| ` static https://developer.android.com/reference/android/animation/ValueAnimator` | ` https://developer.android.com/reference/android/animation/ValueAnimator#ofInt(int[])(int... values) ` Constructs and returns a ValueAnimator that animates between int values. |
| ` static https://developer.android.com/reference/android/animation/ValueAnimator` | ` https://developer.android.com/reference/android/animation/ValueAnimator#ofObject(android.animation.TypeEvaluator,%20java.lang.Object[])(https://developer.android.com/reference/android/animation/TypeEvaluator<T> evaluator, https://developer.android.com/reference/java/lang/Object values) ` Constructs and returns a ValueAnimator that animates between Object values. |
| ` static https://developer.android.com/reference/android/animation/ValueAnimator` | ` https://developer.android.com/reference/android/animation/ValueAnimator#ofPropertyValuesHolder(android.animation.PropertyValuesHolder[])(https://developer.android.com/reference/android/animation/PropertyValuesHolder values) ` Constructs and returns a ValueAnimator that animates between the values specified in the PropertyValuesHolder objects. |
| ` void` | ` https://developer.android.com/reference/android/animation/ValueAnimator#pause()() ` Pauses a running animation. |
| ` static boolean` | ` https://developer.android.com/reference/android/animation/ValueAnimator#registerDurationScaleChangeListener(android.animation.ValueAnimator.DurationScaleChangeListener)(https://developer.android.com/reference/android/animation/ValueAnimator.DurationScaleChangeListener listener) ` Registers a `https://developer.android.com/reference/android/animation/ValueAnimator.DurationScaleChangeListener` This listens for changes to the system-wide scaling factor for Animator-based animations. |
| ` void` | ` https://developer.android.com/reference/android/animation/ValueAnimator#removeAllUpdateListeners()() ` Removes all listeners from the set listening to frame updates for this animation. |
| ` void` | ` https://developer.android.com/reference/android/animation/ValueAnimator#removeUpdateListener(android.animation.ValueAnimator.AnimatorUpdateListener)(https://developer.android.com/reference/android/animation/ValueAnimator.AnimatorUpdateListener listener) ` Removes a listener from the set listening to frame updates for this animation. |
| ` void` | ` https://developer.android.com/reference/android/animation/ValueAnimator#resume()() ` Resumes a paused animation, causing the animator to pick up where it left off when it was paused. |
| ` void` | ` https://developer.android.com/reference/android/animation/ValueAnimator#reverse()() ` Plays the ValueAnimator in reverse. |
| ` void` | ` https://developer.android.com/reference/android/animation/ValueAnimator#setCurrentFraction(float)(float fraction) ` Sets the position of the animation to the specified fraction. |
| ` void` | ` https://developer.android.com/reference/android/animation/ValueAnimator#setCurrentPlayTime(long)(long playTime) ` Sets the position of the animation to the specified point in time. |
| ` https://developer.android.com/reference/android/animation/ValueAnimator` | ` https://developer.android.com/reference/android/animation/ValueAnimator#setDuration(long)(long duration) ` Sets the length of the animation. |
| ` void` | ` https://developer.android.com/reference/android/animation/ValueAnimator#setEvaluator(android.animation.TypeEvaluator)(https://developer.android.com/reference/android/animation/TypeEvaluator<T> value) ` The type evaluator to be used when calculating the animated values of this animation. |
| ` void` | ` https://developer.android.com/reference/android/animation/ValueAnimator#setFloatValues(float[])(float... values) ` Sets float values that will be animated between. |
| ` static void` | ` https://developer.android.com/reference/android/animation/ValueAnimator#setFrameDelay(long)(long frameDelay) ` The amount of time, in milliseconds, between each frame of the animation. |
| ` void` | ` https://developer.android.com/reference/android/animation/ValueAnimator#setIntValues(int[])(int... values) ` Sets int values that will be animated between. |
| ` void` | ` https://developer.android.com/reference/android/animation/ValueAnimator#setInterpolator(android.animation.TimeInterpolator)(https://developer.android.com/reference/android/animation/TimeInterpolator value) ` The time interpolator used in calculating the elapsed fraction of this animation. |
| ` void` | ` https://developer.android.com/reference/android/animation/ValueAnimator#setObjectValues(java.lang.Object[])(https://developer.android.com/reference/java/lang/Object values) ` Sets the values to animate between for this animation. |
| ` void` | ` https://developer.android.com/reference/android/animation/ValueAnimator#setRepeatCount(int)(int value) ` Sets how many times the animation should be repeated. |
| ` void` | ` https://developer.android.com/reference/android/animation/ValueAnimator#setRepeatMode(int)(int value) ` Defines what this animation should do when it reaches the end. |
| ` void` | ` https://developer.android.com/reference/android/animation/ValueAnimator#setStartDelay(long)(long startDelay) ` The amount of time, in milliseconds, to delay starting the animation after `https://developer.android.com/reference/android/animation/ValueAnimator#start()` is called. |
| ` void` | ` https://developer.android.com/reference/android/animation/ValueAnimator#setValues(android.animation.PropertyValuesHolder[])(https://developer.android.com/reference/android/animation/PropertyValuesHolder values) ` Sets the values, per property, being animated between. |
| ` void` | ` https://developer.android.com/reference/android/animation/ValueAnimator#start()() ` Starts this animation. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/animation/ValueAnimator#toString()() ` Returns a string representation of the object. |
| ` static boolean` | ` https://developer.android.com/reference/android/animation/ValueAnimator#unregisterDurationScaleChangeListener(android.animation.ValueAnimator.DurationScaleChangeListener)(https://developer.android.com/reference/android/animation/ValueAnimator.DurationScaleChangeListener listener) ` Unregisters a DurationScaleChangeListener. |

### Inherited methods

From class ` https://developer.android.com/reference/android/animation/Animator ` ` void` ` https://developer.android.com/reference/android/animation/Animator#addListener(android.animation.Animator.AnimatorListener)(https://developer.android.com/reference/android/animation/Animator.AnimatorListener listener) `

Adds a listener to the set of listeners that are sent events through the life of an animation, such as start, repeat, and end.
` void` ` https://developer.android.com/reference/android/animation/Animator#addPauseListener(android.animation.Animator.AnimatorPauseListener)(https://developer.android.com/reference/android/animation/Animator.AnimatorPauseListener listener) `

Adds a pause listener to this animator.
` void` ` https://developer.android.com/reference/android/animation/Animator#cancel()() `

Cancels the animation.
` https://developer.android.com/reference/android/animation/Animator` ` https://developer.android.com/reference/android/animation/Animator#clone()() `

Creates and returns a copy of this object.
` void` ` https://developer.android.com/reference/android/animation/Animator#end()() `

Ends the animation.
` abstract long` ` https://developer.android.com/reference/android/animation/Animator#getDuration()() `

Gets the duration of the animation.
` https://developer.android.com/reference/android/animation/TimeInterpolator` ` https://developer.android.com/reference/android/animation/Animator#getInterpolator()() `

Returns the timing interpolator that this animation uses.
` https://developer.android.com/reference/java/util/ArrayList<https://developer.android.com/reference/android/animation/Animator.AnimatorListener>` ` https://developer.android.com/reference/android/animation/Animator#getListeners()() `

Gets the set of `https://developer.android.com/reference/android/animation/Animator.AnimatorListener` objects that are currently listening for events on this `Animator` object.
` abstract long` ` https://developer.android.com/reference/android/animation/Animator#getStartDelay()() `

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

Gets the total duration of the animation, accounting for animation sequences, start delay, and repeating.
` boolean` ` https://developer.android.com/reference/android/animation/Animator#isPaused()() `

Returns whether this animator is currently in a paused state.
` abstract boolean` ` https://developer.android.com/reference/android/animation/Animator#isRunning()() `

Returns whether this Animator is currently running (having been started and gone past any initial startDelay period and not yet ended).
` boolean` ` https://developer.android.com/reference/android/animation/Animator#isStarted()() `

Returns whether this Animator has been started and not yet ended.
` void` ` https://developer.android.com/reference/android/animation/Animator#pause()() `

Pauses a running animation.
` void` ` https://developer.android.com/reference/android/animation/Animator#removeAllListeners()() `

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

Removes a listener from the set listening to this animation.
` void` ` https://developer.android.com/reference/android/animation/Animator#removePauseListener(android.animation.Animator.AnimatorPauseListener)(https://developer.android.com/reference/android/animation/Animator.AnimatorPauseListener listener) `

Removes a pause listener from the set listening to this animation.
` void` ` https://developer.android.com/reference/android/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/android/animation/Animator` ` https://developer.android.com/reference/android/animation/Animator#setDuration(long)(long duration) `

Sets the duration of the animation.
` abstract void` ` https://developer.android.com/reference/android/animation/Animator#setInterpolator(android.animation.TimeInterpolator)(https://developer.android.com/reference/android/animation/TimeInterpolator value) `

The time interpolator used in calculating the elapsed fraction of the animation.
` abstract void` ` https://developer.android.com/reference/android/animation/Animator#setStartDelay(long)(long startDelay) `

The amount of time, in milliseconds, to delay processing the animation after `https://developer.android.com/reference/android/animation/Animator#start()` is called.
` void` ` https://developer.android.com/reference/android/animation/Animator#setTarget(java.lang.Object)(https://developer.android.com/reference/java/lang/Object target) `

Sets the target object whose property will be animated by this animation.
` void` ` https://developer.android.com/reference/android/animation/Animator#setupEndValues()() `

This method tells the object to use appropriate information to extract ending values for the animation.
` void` ` https://developer.android.com/reference/android/animation/Animator#setupStartValues()() `

This method tells the object to use appropriate information to extract starting values for the animation.
` void` ` https://developer.android.com/reference/android/animation/Animator#start()() `

Starts this animation.
From class ` https://developer.android.com/reference/java/lang/Object ` ` https://developer.android.com/reference/java/lang/Object` ` https://developer.android.com/reference/java/lang/Object#clone()() `

Creates and returns a copy of this object.
` boolean` ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) `

Indicates whether some other object is "equal to" this one.
` void` ` https://developer.android.com/reference/java/lang/Object#finalize()() `

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
` final https://developer.android.com/reference/java/lang/Class<?>` ` https://developer.android.com/reference/java/lang/Object#getClass()() `

Returns the runtime class of this `Object`.
` int` ` https://developer.android.com/reference/java/lang/Object#hashCode()() `

Returns a hash code value for the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#notify()() `

Wakes up a single thread that is waiting on this object's monitor.
` final void` ` https://developer.android.com/reference/java/lang/Object#notifyAll()() `

Wakes up all threads that are waiting on this object's monitor.
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/java/lang/Object#toString()() `

Returns a string representation of the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait()() `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*.

## Constants

### INFINITE

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int INFINITE
```

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

<br />

Constant Value: -1 (0xffffffff)

### RESTART

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int RESTART
```

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

<br />

Constant Value: 1 (0x00000001)

### REVERSE

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int REVERSE
```

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

<br />

Constant Value: 2 (0x00000002)

## Public constructors

### ValueAnimator

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public ValueAnimator ()
```

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

<br />

## Public methods

### addUpdateListener

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void addUpdateListener (ValueAnimator.AnimatorUpdateListener listener)
```

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.

<br />

| Parameters ||
|---|---|
| `listener` | `ValueAnimator.AnimatorUpdateListener`: the listener to be added to the current set of listeners for this animation. <br /> |

### areAnimatorsEnabled

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static boolean areAnimatorsEnabled ()
```

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.

<br />

| Returns ||
|---|---|
| `boolean` | boolean Whether animators are currently enabled. The default value is `true`. <br /> |

### cancel

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void cancel ()
```

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

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

<br />

<br />

### clone

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public ValueAnimator clone ()
```

Creates and returns a copy of this object. The precise meaning of "copy" may depend on the class of the object. The general intent is that, for any object `x`, the expression:
>
> ```
> x.clone() != x
> ```
will be true, and that the expression:
>
> ```
> x.clone().getClass() == x.getClass()
> ```
will be `true`, but these are not absolute requirements. While it is typically the case that:
>
> ```
> x.clone().equals(x)
> ```
will be `true`, this is not an absolute requirement.

By convention, the returned object should be obtained by calling `super.clone`. If a class and all of its superclasses (except `Object`) obey this convention, it will be the case that `x.clone().getClass() == x.getClass()`.

By convention, the object returned by this method should be independent of this object (which is being cloned). To achieve this independence, it may be necessary to modify one or more fields of the object returned by `super.clone` before returning it. Typically, this means copying any mutable objects that comprise the internal "deep structure" of the object being cloned and replacing the references to these objects with references to the copies. If a class contains only primitive fields or references to immutable objects, then it is usually the case that no fields in the object returned by `super.clone` need to be modified.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/animation/ValueAnimator` | a clone of this instance. <br /> |

### end

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void end ()
```

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/android/animation/Animator.AnimatorListener#onAnimationEnd(android.animation.Animator)` method on its listeners.

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

<br />

<br />

### getAnimatedFraction

Added in [API level 12](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public float getAnimatedFraction ()
```

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

<br />

| Returns ||
|---|---|
| `float` | Elapsed/interpolated fraction of the animation. <br /> |

### getAnimatedValue

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Object getAnimatedValue ()
```

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/android/animation/ValueAnimator.AnimatorUpdateListener#onAnimationUpdate(android.animation.ValueAnimator)`, which is called during each animation frame, immediately after the value is calculated.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/Object` | 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. <br /> |

### getAnimatedValue

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Object getAnimatedValue (String propertyName)
```

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/android/animation/ValueAnimator.AnimatorUpdateListener#onAnimationUpdate(android.animation.ValueAnimator)`, which is called during each animation frame, immediately after the value is calculated.

<br />

| Parameters ||
|---|---|
| `propertyName` | `String` <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/Object` | animatedValue The value most recently calculated for the named property by this `ValueAnimator`. <br /> |

### getCurrentPlayTime

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public long getCurrentPlayTime ()
```

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/android/animation/ValueAnimator#setCurrentPlayTime(long)` or `https://developer.android.com/reference/android/animation/ValueAnimator#setCurrentFraction(float)`, in which case it will return the time that was set.

<br />

| Returns ||
|---|---|
| `long` | The current position in time of the animation. <br /> |

### getDuration

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public long getDuration ()
```

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

<br />

| Returns ||
|---|---|
| `long` | The length of the animation, in milliseconds. <br /> |

### getDurationScale

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static float getDurationScale ()
```

Returns the system-wide scaling factor for Animator-based animations. This affects both the start delay and duration of all such animations. Setting to 0 will cause animations to end immediately. The default value is 1.0f.

<br />

| Returns ||
|---|---|
| `float` | the duration scale. Value is 0.0f or greater <br /> |

### getFrameDelay

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static long getFrameDelay ()
```

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/android/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.

<br />

| Returns ||
|---|---|
| `long` | the requested time between frames, in milliseconds <br /> |

### getInterpolator

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public TimeInterpolator getInterpolator ()
```

Returns the timing interpolator that this ValueAnimator uses.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/animation/TimeInterpolator` | The timing interpolator for this ValueAnimator. <br /> |

### getRepeatCount

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getRepeatCount ()
```

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

<br />

| Returns ||
|---|---|
| `int` | the number of times the animation should repeat, or `https://developer.android.com/reference/android/animation/ValueAnimator#INFINITE` <br /> |

### getRepeatMode

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getRepeatMode ()
```

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

<br />

| Returns ||
|---|---|
| `int` | either one of `https://developer.android.com/reference/android/animation/ValueAnimator#REVERSE` or `https://developer.android.com/reference/android/animation/ValueAnimator#RESTART` Value is one of the following: - `https://developer.android.com/reference/android/animation/ValueAnimator#RESTART` - `https://developer.android.com/reference/android/animation/ValueAnimator#REVERSE` |

### getStartDelay

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public long getStartDelay ()
```

The amount of time, in milliseconds, to delay starting the animation after `https://developer.android.com/reference/android/animation/ValueAnimator#start()` is called.

<br />

| Returns ||
|---|---|
| `long` | the number of milliseconds to delay running the animation <br /> |

### getTotalDuration

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public long getTotalDuration ()
```

Gets the total duration of the animation, accounting for animation sequences, start delay, and repeating. Return `https://developer.android.com/reference/android/animation/Animator#DURATION_INFINITE` if the duration is infinite.

<br />

| Returns ||
|---|---|
| `long` | Total time an animation takes to finish, starting from the time `https://developer.android.com/reference/android/animation/Animator#start()` is called. `https://developer.android.com/reference/android/animation/Animator#DURATION_INFINITE` will be returned if the animation or any child animation repeats infinite times. <br /> |

### getValues

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public PropertyValuesHolder[] getValues ()
```

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.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/animation/PropertyValuesHolder` | PropertyValuesHolder\[\] An array of PropertyValuesHolder objects which hold the values, per property, that define the animation. <br /> |

### isRunning

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isRunning ()
```

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

<br />

| Returns ||
|---|---|
| `boolean` | Whether the Animator is running. <br /> |

### isStarted

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isStarted ()
```

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#createCircularReveal(android.view.View,%20int,%20int,%20float,%20float)`), this state is a superset of `https://developer.android.com/reference/android/animation/Animator#isRunning()`, because an Animator with a nonzero `https://developer.android.com/reference/android/animation/Animator#getStartDelay()` will return true for `https://developer.android.com/reference/android/animation/Animator#isStarted()` during the delay phase, whereas `https://developer.android.com/reference/android/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.

<br />

| Returns ||
|---|---|
| `boolean` | Whether the Animator has been started and not yet ended. <br /> |

### ofArgb

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static ValueAnimator ofArgb (int... values)
```

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.

<br />

| Parameters ||
|---|---|
| `values` | `int`: A set of values that the animation will animate between over time. <br /> |

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

### ofFloat

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static ValueAnimator ofFloat (float... values)
```

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.

<br />

| Parameters ||
|---|---|
| `values` | `float`: A set of values that the animation will animate between over time. <br /> |

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

### ofInt

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static ValueAnimator ofInt (int... values)
```

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.

<br />

| Parameters ||
|---|---|
| `values` | `int`: A set of values that the animation will animate between over time. <br /> |

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

### ofObject

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static ValueAnimator ofObject (TypeEvaluator<T> evaluator, 
                Object... values)
```

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.

<br />

| Parameters ||
|---|---|
| `evaluator` | `TypeEvaluator`: A TypeEvaluator that will be called on each animation frame to provide the ncessry interpolation between the Object values to derive the animated value. <br /> |
| `values` | `Object`: A set of values that the animation will animate between over time. <br /> |

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

### ofPropertyValuesHolder

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static ValueAnimator ofPropertyValuesHolder (PropertyValuesHolder... values)
```

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

<br />

| Parameters ||
|---|---|
| `values` | `PropertyValuesHolder`: A set of PropertyValuesHolder objects whose values will be animated between over time. <br /> |

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

### pause

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void pause ()
```

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/android/animation/Animator#isStarted()` or has since ended, then the call is ignored. Paused animations can be resumed by calling `https://developer.android.com/reference/android/animation/Animator#resume()`.

<br />

### registerDurationScaleChangeListener

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static boolean registerDurationScaleChangeListener (ValueAnimator.DurationScaleChangeListener listener)
```

Registers a `https://developer.android.com/reference/android/animation/ValueAnimator.DurationScaleChangeListener` This listens for changes to the system-wide scaling factor for Animator-based animations. Listeners will be called on the main thread.

<br />

| Parameters ||
|---|---|
| `listener` | `ValueAnimator.DurationScaleChangeListener`: the listener to register. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `boolean` | true if the listener was registered. <br /> |

### removeAllUpdateListeners

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void removeAllUpdateListeners ()
```

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

<br />

### removeUpdateListener

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void removeUpdateListener (ValueAnimator.AnimatorUpdateListener listener)
```

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

<br />

| Parameters ||
|---|---|
| `listener` | `ValueAnimator.AnimatorUpdateListener`: the listener to be removed from the current set of update listeners for this animation. <br /> |

### resume

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void resume ()
```

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.

<br />

### reverse

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void reverse ()
```

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.

<br />

### setCurrentFraction

Added in [API level 22](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setCurrentFraction (float fraction)
```

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/android/animation/Animator.AnimatorListener` events are not called due to changing the fraction; those events are only processed while the animation is running.

<br />

| Parameters ||
|---|---|
| `fraction` | `float`: 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. <br /> |

### setCurrentPlayTime

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setCurrentPlayTime (long playTime)
```

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.

<br />

| Parameters ||
|---|---|
| `playTime` | `long`: The time, in milliseconds, to which the animation is advanced or rewound. <br /> |

### setDuration

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public ValueAnimator setDuration (long duration)
```

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

<br />

| Parameters ||
|---|---|
| `duration` | `long`: The length of the animation, in milliseconds. This value cannot be negative. <br /> |

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

### setEvaluator

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setEvaluator (TypeEvaluator<T> value)
```

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/android/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.

<br />

<br />

| Parameters ||
|---|---|
| `value` | `TypeEvaluator`: the evaluator to be used this animation <br /> |

### setFloatValues

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setFloatValues (float... values)
```

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.

<br />

<br />

| Parameters ||
|---|---|
| `values` | `float`: A set of values that the animation will animate between over time. <br /> |

### setFrameDelay

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static void setFrameDelay (long frameDelay)
```

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/android/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.

<br />

| Parameters ||
|---|---|
| `frameDelay` | `long`: the requested time between frames, in milliseconds <br /> |

### setIntValues

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setIntValues (int... values)
```

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.

<br />

<br />

| Parameters ||
|---|---|
| `values` | `int`: A set of values that the animation will animate between over time. <br /> |

### setInterpolator

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setInterpolator (TimeInterpolator value)
```

The time 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/android/view/animation/AccelerateDecelerateInterpolator`

<br />

| Parameters ||
|---|---|
| `value` | `TimeInterpolator`: the interpolator to be used by this animation. A value of `null` will result in linear interpolation. <br /> |

### setObjectValues

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setObjectValues (Object... values)
```

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.

<br />

<br />

| Parameters ||
|---|---|
| `values` | `Object`: The set of values to animate between. <br /> |

### setRepeatCount

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setRepeatCount (int value)
```

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/android/animation/ValueAnimator#INFINITE`, the repeat mode will be taken into account. The repeat count is 0 by default.

<br />

| Parameters ||
|---|---|
| `value` | `int`: the number of times the animation should be repeated <br /> |

### setRepeatMode

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setRepeatMode (int value)
```

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/android/animation/ValueAnimator#INFINITE`. Defaults to `https://developer.android.com/reference/android/animation/ValueAnimator#RESTART`.

<br />

| Parameters ||
|---|---|
| `value` | `int`: `https://developer.android.com/reference/android/animation/ValueAnimator#RESTART` or `https://developer.android.com/reference/android/animation/ValueAnimator#REVERSE` Value is one of the following: - `https://developer.android.com/reference/android/animation/ValueAnimator#RESTART` - `https://developer.android.com/reference/android/animation/ValueAnimator#REVERSE` |

### setStartDelay

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setStartDelay (long startDelay)
```

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

<br />

| Parameters ||
|---|---|
| `startDelay` | `long`: The amount of the delay, in milliseconds <br /> |

### setValues

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setValues (PropertyValuesHolder... values)
```

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.

<br />

| Parameters ||
|---|---|
| `values` | `PropertyValuesHolder`: The set of values, per property, being animated between. <br /> |

### start

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void start ()
```

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/android/animation/Animator.AnimatorListener#onAnimationStart(android.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.

<br />

<br />

### toString

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String toString ()
```

Returns a string representation of the object.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | a string representation of the object. <br /> |

### unregisterDurationScaleChangeListener

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static boolean unregisterDurationScaleChangeListener (ValueAnimator.DurationScaleChangeListener listener)
```

Unregisters a DurationScaleChangeListener.

<br />

| Parameters ||
|---|---|
| `listener` | `ValueAnimator.DurationScaleChangeListener`: the listener to unregister. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `boolean` | true if the listener was unregistered. <br /> |

**See also:**

- `https://developer.android.com/reference/android/animation/ValueAnimator#registerDurationScaleChangeListener(android.animation.ValueAnimator.DurationScaleChangeListener)`