# AnimatorSet

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/AnimatorSet#nestedclasses)\|[Inherited Constants](https://developer.android.com/reference/android/animation/AnimatorSet#inhconstants)\|[Ctors](https://developer.android.com/reference/android/animation/AnimatorSet#pubctors)\|[Methods](https://developer.android.com/reference/android/animation/AnimatorSet#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/animation/AnimatorSet#inhmethods)  

# AnimatorSet

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/android/animation/AnimatorSet "View this page in Kotlin")\|Java

`
public

final

class
AnimatorSet
`  
`


``

extends `[Animator](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.AnimatorSet |

<br />

*** ** * ** ***

This class plays a set of[Animator](https://developer.android.com/reference/android/animation/Animator)objects in the specified order. Animations can be set up to play together, in sequence, or after a specified delay.

There are two different approaches to adding animations to a`AnimatorSet`: either the[playTogether()](https://developer.android.com/reference/android/animation/AnimatorSet#playTogether(android.animation.Animator[]))or[playSequentially()](https://developer.android.com/reference/android/animation/AnimatorSet#playSequentially(android.animation.Animator[]))methods can be called to add a set of animations all at once, or the[AnimatorSet.play(Animator)](https://developer.android.com/reference/android/animation/AnimatorSet#play(android.animation.Animator))can be used in conjunction with methods in the[Builder](https://developer.android.com/reference/android/animation/AnimatorSet.Builder)class to add animations one by one.

It is possible to set up a`AnimatorSet`with circular dependencies between its animations. For example, an animation a1 could be set up to start before animation a2, a2 before a3, and a3 before a1. The results of this configuration are undefined, but will typically result in none of the affected animations being played. Because of this (and because circular dependencies do not make logical sense anyway), circular dependencies should be avoided, and the dependency flow of animations should only be in one direction.  

### Developer Guides

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

<br />

## Summary

|                                                                                                                         ### Nested classes                                                                                                                         ||
|----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` class` | [AnimatorSet.Builder](https://developer.android.com/reference/android/animation/AnimatorSet.Builder) The`Builder`object is a utility class to facilitate adding animations to a`AnimatorSet`along with the relationships between the various animations. |

|                                                                                                                                                                                                                                                       ### Inherited constants                                                                                                                                                                                                                                                        |
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| From class[android.animation.Animator](https://developer.android.com/reference/android/animation/Animator) |--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `long` | [DURATION_INFINITE](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                                            ||
|------------------------------------------------------------------------------------------------------------|---|
| ` `[AnimatorSet](https://developer.android.com/reference/android/animation/AnimatorSet#AnimatorSet())`() ` |

|                                                                                                                                                                                                                                                                                                                            ### Public methods                                                                                                                                                                                                                                                                                                                             ||
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` void`                                                                                                                                                         | ` `[cancel](https://developer.android.com/reference/android/animation/AnimatorSet#cancel())`() ` Cancels the animation. Note that canceling a`AnimatorSet`also cancels all of the animations that it is responsible for.                                                                                                                                                                                                                                                                                 |
| ` `[AnimatorSet](https://developer.android.com/reference/android/animation/AnimatorSet)                                                                         | ` `[clone](https://developer.android.com/reference/android/animation/AnimatorSet#clone())`() ` Creates and returns a copy of this object.                                                                                                                                                                                                                                                                                                                                                                |
| ` void`                                                                                                                                                         | ` `[end](https://developer.android.com/reference/android/animation/AnimatorSet#end())`() ` Ends the animation. Note that ending a`AnimatorSet`also ends all of the animations that it is responsible for.                                                                                                                                                                                                                                                                                                |
| ` `[ArrayList](https://developer.android.com/reference/java/util/ArrayList)`<`[Animator](https://developer.android.com/reference/android/animation/Animator)`>` | ` `[getChildAnimations](https://developer.android.com/reference/android/animation/AnimatorSet#getChildAnimations())`() ` Returns the current list of child Animator objects controlled by this AnimatorSet.                                                                                                                                                                                                                                                                                              |
| ` long`                                                                                                                                                         | ` `[getCurrentPlayTime](https://developer.android.com/reference/android/animation/AnimatorSet#getCurrentPlayTime())`() ` Returns the milliseconds elapsed since the start of the animation.                                                                                                                                                                                                                                                                                                              |
| ` long`                                                                                                                                                         | ` `[getDuration](https://developer.android.com/reference/android/animation/AnimatorSet#getDuration())`() ` Gets the length of each of the child animations of this AnimatorSet.                                                                                                                                                                                                                                                                                                                          |
| ` `[TimeInterpolator](https://developer.android.com/reference/android/animation/TimeInterpolator)                                                               | ` `[getInterpolator](https://developer.android.com/reference/android/animation/AnimatorSet#getInterpolator())`() ` Returns the timing interpolator that this animation uses.                                                                                                                                                                                                                                                                                                                             |
| ` long`                                                                                                                                                         | ` `[getStartDelay](https://developer.android.com/reference/android/animation/AnimatorSet#getStartDelay())`() ` The amount of time, in milliseconds, to delay starting the animation after[start()](https://developer.android.com/reference/android/animation/AnimatorSet#start())is called.                                                                                                                                                                                                              |
| ` long`                                                                                                                                                         | ` `[getTotalDuration](https://developer.android.com/reference/android/animation/AnimatorSet#getTotalDuration())`() ` Gets the total duration of the animation, accounting for animation sequences, start delay, and repeating.                                                                                                                                                                                                                                                                           |
| ` boolean`                                                                                                                                                      | ` `[isRunning](https://developer.android.com/reference/android/animation/AnimatorSet#isRunning())`() ` Returns true if any of the child animations of this AnimatorSet have been started and have not yet ended.                                                                                                                                                                                                                                                                                         |
| ` boolean`                                                                                                                                                      | ` `[isStarted](https://developer.android.com/reference/android/animation/AnimatorSet#isStarted())`() ` Returns whether this Animator has been started and not yet ended.                                                                                                                                                                                                                                                                                                                                 |
| ` void`                                                                                                                                                         | ` `[pause](https://developer.android.com/reference/android/animation/AnimatorSet#pause())`() ` Pauses a running animation.                                                                                                                                                                                                                                                                                                                                                                               |
| ` `[AnimatorSet.Builder](https://developer.android.com/reference/android/animation/AnimatorSet.Builder)                                                         | ` `[play](https://developer.android.com/reference/android/animation/AnimatorSet#play(android.animation.Animator))`(`[Animator](https://developer.android.com/reference/android/animation/Animator)` anim) ` This method creates a`Builder`object, which is used to set up playing constraints.                                                                                                                                                                                                           |
| ` void`                                                                                                                                                         | ` `[playSequentially](https://developer.android.com/reference/android/animation/AnimatorSet#playSequentially(java.util.List<android.animation.Animator>))`(`[List](https://developer.android.com/reference/java/util/List)`<`[Animator](https://developer.android.com/reference/android/animation/Animator)`> items) ` Sets up this AnimatorSet to play each of the supplied animations when the previous animation ends.                                                                                |
| ` void`                                                                                                                                                         | ` `[playSequentially](https://developer.android.com/reference/android/animation/AnimatorSet#playSequentially(android.animation.Animator[]))`(`[Animator...](https://developer.android.com/reference/android/animation/Animator)` items) ` Sets up this AnimatorSet to play each of the supplied animations when the previous animation ends.                                                                                                                                                             |
| ` void`                                                                                                                                                         | ` `[playTogether](https://developer.android.com/reference/android/animation/AnimatorSet#playTogether(android.animation.Animator[]))`(`[Animator...](https://developer.android.com/reference/android/animation/Animator)` items) ` Sets up this AnimatorSet to play all of the supplied animations at the same time.                                                                                                                                                                                      |
| ` void`                                                                                                                                                         | ` `[playTogether](https://developer.android.com/reference/android/animation/AnimatorSet#playTogether(java.util.Collection<android.animation.Animator>))`(`[Collection](https://developer.android.com/reference/java/util/Collection)`<`[Animator](https://developer.android.com/reference/android/animation/Animator)`> items) ` Sets up this AnimatorSet to play all of the supplied animations at the same time.                                                                                       |
| ` void`                                                                                                                                                         | ` `[resume](https://developer.android.com/reference/android/animation/AnimatorSet#resume())`() ` Resumes a paused animation, causing the animator to pick up where it left off when it was paused.                                                                                                                                                                                                                                                                                                       |
| ` void`                                                                                                                                                         | ` `[reverse](https://developer.android.com/reference/android/animation/AnimatorSet#reverse())`() ` Plays the AnimatorSet in reverse.                                                                                                                                                                                                                                                                                                                                                                     |
| ` void`                                                                                                                                                         | ` `[setCurrentPlayTime](https://developer.android.com/reference/android/animation/AnimatorSet#setCurrentPlayTime(long))`(long playTime) ` Sets the position of the animation to the specified point in time.                                                                                                                                                                                                                                                                                             |
| ` `[AnimatorSet](https://developer.android.com/reference/android/animation/AnimatorSet)                                                                         | ` `[setDuration](https://developer.android.com/reference/android/animation/AnimatorSet#setDuration(long))`(long duration) ` Sets the length of each of the current child animations of this AnimatorSet.                                                                                                                                                                                                                                                                                                 |
| ` void`                                                                                                                                                         | ` `[setInterpolator](https://developer.android.com/reference/android/animation/AnimatorSet#setInterpolator(android.animation.TimeInterpolator))`(`[TimeInterpolator](https://developer.android.com/reference/android/animation/TimeInterpolator)` interpolator) ` Sets the TimeInterpolator for all current[child animations](https://developer.android.com/reference/android/animation/AnimatorSet#getChildAnimations())of this AnimatorSet.                                                            |
| ` void`                                                                                                                                                         | ` `[setStartDelay](https://developer.android.com/reference/android/animation/AnimatorSet#setStartDelay(long))`(long startDelay) ` The amount of time, in milliseconds, to delay starting the animation after[start()](https://developer.android.com/reference/android/animation/AnimatorSet#start())is called.                                                                                                                                                                                           |
| ` void`                                                                                                                                                         | ` `[setTarget](https://developer.android.com/reference/android/animation/AnimatorSet#setTarget(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` target) ` Sets the target object for all current[child animations](https://developer.android.com/reference/android/animation/AnimatorSet#getChildAnimations())of this AnimatorSet that take targets ([ObjectAnimator](https://developer.android.com/reference/android/animation/ObjectAnimator)and AnimatorSet). |
| ` void`                                                                                                                                                         | ` `[setupEndValues](https://developer.android.com/reference/android/animation/AnimatorSet#setupEndValues())`() ` This method tells the object to use appropriate information to extract ending values for the animation.                                                                                                                                                                                                                                                                                 |
| ` void`                                                                                                                                                         | ` `[setupStartValues](https://developer.android.com/reference/android/animation/AnimatorSet#setupStartValues())`() ` This method tells the object to use appropriate information to extract starting values for the animation.                                                                                                                                                                                                                                                                           |
| ` void`                                                                                                                                                         | ` `[start](https://developer.android.com/reference/android/animation/AnimatorSet#start())`() ` Starts this animation. Starting this`AnimatorSet`will, in turn, start the animations for which it is responsible.                                                                                                                                                                                                                                                                                         |
| ` `[String](https://developer.android.com/reference/java/lang/String)                                                                                           | ` `[toString](https://developer.android.com/reference/android/animation/AnimatorSet#toString())`() ` Returns a string representation of the object.                                                                                                                                                                                                                                                                                                                                                      |

| ### Inherited methods |
|-----------------------|---|
| From class` `[android.animation.Animator](https://developer.android.com/reference/android/animation/Animator)` ` |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` void`                                                                                                                                                                                           | ` `[addListener](https://developer.android.com/reference/android/animation/Animator#addListener(android.animation.Animator.AnimatorListener))`(`[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`                                                                                                                                                                                           | ` `[addPauseListener](https://developer.android.com/reference/android/animation/Animator#addPauseListener(android.animation.Animator.AnimatorPauseListener))`(`[Animator.AnimatorPauseListener](https://developer.android.com/reference/android/animation/Animator.AnimatorPauseListener)` listener) ` Adds a pause listener to this animator.                                                                                                       | | ` void`                                                                                                                                                                                           | ` `[cancel](https://developer.android.com/reference/android/animation/Animator#cancel())`() ` Cancels the animation.                                                                                                                                                                                                                                                                                                                                 | | ` `[Animator](https://developer.android.com/reference/android/animation/Animator)                                                                                                                 | ` `[clone](https://developer.android.com/reference/android/animation/Animator#clone())`() ` Creates and returns a copy of this object.                                                                                                                                                                                                                                                                                                               | | ` void`                                                                                                                                                                                           | ` `[end](https://developer.android.com/reference/android/animation/Animator#end())`() ` Ends the animation.                                                                                                                                                                                                                                                                                                                                          | | ` abstract long`                                                                                                                                                                                  | ` `[getDuration](https://developer.android.com/reference/android/animation/Animator#getDuration())`() ` Gets the duration of the animation.                                                                                                                                                                                                                                                                                                          | | ` `[TimeInterpolator](https://developer.android.com/reference/android/animation/TimeInterpolator)                                                                                                 | ` `[getInterpolator](https://developer.android.com/reference/android/animation/Animator#getInterpolator())`() ` Returns the timing interpolator that this animation uses.                                                                                                                                                                                                                                                                            | | ` `[ArrayList](https://developer.android.com/reference/java/util/ArrayList)`<`[Animator.AnimatorListener](https://developer.android.com/reference/android/animation/Animator.AnimatorListener)`>` | ` `[getListeners](https://developer.android.com/reference/android/animation/Animator#getListeners())`() ` Gets the set of[Animator.AnimatorListener](https://developer.android.com/reference/android/animation/Animator.AnimatorListener)objects that are currently listening for events on this`Animator`object.                                                                                                                                    | | ` abstract long`                                                                                                                                                                                  | ` `[getStartDelay](https://developer.android.com/reference/android/animation/Animator#getStartDelay())`() ` The amount of time, in milliseconds, to delay processing the animation after[start()](https://developer.android.com/reference/android/animation/Animator#start())is called.                                                                                                                                                              | | ` long`                                                                                                                                                                                           | ` `[getTotalDuration](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`                                                                                                                                                                                        | ` `[isPaused](https://developer.android.com/reference/android/animation/Animator#isPaused())`() ` Returns whether this animator is currently in a paused state.                                                                                                                                                                                                                                                                                      | | ` abstract boolean`                                                                                                                                                                               | ` `[isRunning](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`                                                                                                                                                                                        | ` `[isStarted](https://developer.android.com/reference/android/animation/Animator#isStarted())`() ` Returns whether this Animator has been started and not yet ended.                                                                                                                                                                                                                                                                                | | ` void`                                                                                                                                                                                           | ` `[pause](https://developer.android.com/reference/android/animation/Animator#pause())`() ` Pauses a running animation.                                                                                                                                                                                                                                                                                                                              | | ` void`                                                                                                                                                                                           | ` `[removeAllListeners](https://developer.android.com/reference/android/animation/Animator#removeAllListeners())`() ` Removes all[listeners](https://developer.android.com/reference/android/animation/Animator#addListener(android.animation.Animator.AnimatorListener))and[pauseListeners](https://developer.android.com/reference/android/animation/Animator#addPauseListener(android.animation.Animator.AnimatorPauseListener))from this object. | | ` void`                                                                                                                                                                                           | ` `[removeListener](https://developer.android.com/reference/android/animation/Animator#removeListener(android.animation.Animator.AnimatorListener))`(`[Animator.AnimatorListener](https://developer.android.com/reference/android/animation/Animator.AnimatorListener)` listener) ` Removes a listener from the set listening to this animation.                                                                                                     | | ` void`                                                                                                                                                                                           | ` `[removePauseListener](https://developer.android.com/reference/android/animation/Animator#removePauseListener(android.animation.Animator.AnimatorPauseListener))`(`[Animator.AnimatorPauseListener](https://developer.android.com/reference/android/animation/Animator.AnimatorPauseListener)` listener) ` Removes a pause listener from the set listening to this animation.                                                                      | | ` void`                                                                                                                                                                                           | ` `[resume](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 `[Animator](https://developer.android.com/reference/android/animation/Animator)                                                                                                        | ` `[setDuration](https://developer.android.com/reference/android/animation/Animator#setDuration(long))`(long duration) ` Sets the duration of the animation.                                                                                                                                                                                                                                                                                         | | ` abstract void`                                                                                                                                                                                  | ` `[setInterpolator](https://developer.android.com/reference/android/animation/Animator#setInterpolator(android.animation.TimeInterpolator))`(`[TimeInterpolator](https://developer.android.com/reference/android/animation/TimeInterpolator)` value) ` The time interpolator used in calculating the elapsed fraction of the animation.                                                                                                             | | ` abstract void`                                                                                                                                                                                  | ` `[setStartDelay](https://developer.android.com/reference/android/animation/Animator#setStartDelay(long))`(long startDelay) ` The amount of time, in milliseconds, to delay processing the animation after[start()](https://developer.android.com/reference/android/animation/Animator#start())is called.                                                                                                                                           | | ` void`                                                                                                                                                                                           | ` `[setTarget](https://developer.android.com/reference/android/animation/Animator#setTarget(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` target) ` Sets the target object whose property will be animated by this animation.                                                                                                                                                                             | | ` void`                                                                                                                                                                                           | ` `[setupEndValues](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`                                                                                                                                                                                           | ` `[setupStartValues](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`                                                                                                                                                                                           | ` `[start](https://developer.android.com/reference/android/animation/Animator#start())`() ` Starts this animation.                                                                                                                                                                                                                                                                                                                                   | ||
| From class` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object)` ` |--------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](https://developer.android.com/reference/java/lang/Object)          | ` `[clone](https://developer.android.com/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object.                                                                                                                                                      | | ` boolean`                                                                     | ` `[equals](https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` obj) ` Indicates whether some other object is "equal to" this one.                                           | | ` void`                                                                        | ` `[finalize](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 `[Class](https://developer.android.com/reference/java/lang/Class)`<?>` | ` `[getClass](https://developer.android.com/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this`Object`.                                                                                                                                                | | ` int`                                                                         | ` `[hashCode](https://developer.android.com/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object.                                                                                                                                                 | | ` final void`                                                                  | ` `[notify](https://developer.android.com/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor.                                                                                                                            | | ` final void`                                                                  | ` `[notifyAll](https://developer.android.com/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor.                                                                                                                         | | ` `[String](https://developer.android.com/reference/java/lang/String)          | ` `[toString](https://developer.android.com/reference/java/lang/Object#toString())`() ` Returns a string representation of the object.                                                                                                                                            | | ` final void`                                                                  | ` `[wait](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`                                                                  | ` `[wait](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`                                                                  | ` `[wait](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*.                                                                                             | ||

## Public constructors

### AnimatorSet

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

```
public AnimatorSet ()
```

<br />

<br />

## Public methods

### cancel

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

```
public void cancel ()
```

Cancels the animation. Unlike[end()](https://developer.android.com/reference/android/animation/Animator#end()),`cancel()`causes the animation to stop in its tracks, sending an[Animator.AnimatorListener.onAnimationCancel(Animator)](https://developer.android.com/reference/android/animation/Animator.AnimatorListener#onAnimationCancel(android.animation.Animator))to its listeners, followed by an[Animator.AnimatorListener.onAnimationEnd(Animator)](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.

Note that canceling a`AnimatorSet`also cancels all of the animations that it is responsible for.

<br />

<br />

### clone

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

```
public AnimatorSet 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                                                         ||
|--------------------------------------------------------------------------------------|----------------------------------|
| [AnimatorSet](https://developer.android.com/reference/android/animation/AnimatorSet) | 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[Animator.AnimatorListener.onAnimationEnd(Animator)](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.

Note that ending a`AnimatorSet`also ends all of the animations that it is responsible for.

<br />

<br />

### getChildAnimations

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

```
public ArrayList<Animator> getChildAnimations ()
```

Returns the current list of child Animator objects controlled by this AnimatorSet. This is a copy of the internal list; modifications to the returned list will not affect the AnimatorSet, although changes to the underlying Animator objects will affect those objects being managed by the AnimatorSet.

<br />

|                                                                                                             Returns                                                                                                             ||
|--------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------|
| [ArrayList](https://developer.android.com/reference/java/util/ArrayList)`<`[Animator](https://developer.android.com/reference/android/animation/Animator)`>` | ArrayListThe list of child animations of this AnimatorSet. <br /> |

### getCurrentPlayTime

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

```
public long getCurrentPlayTime ()
```

Returns the milliseconds elapsed since the start of the animation.

For ongoing animations, this method returns the current progress of the animation in terms of play time. For an animation that has not yet been started: if the animation has been seeked to a certain time via[setCurrentPlayTime(long)](https://developer.android.com/reference/android/animation/AnimatorSet#setCurrentPlayTime(long)), the seeked play time will be returned; otherwise, this method will return 0.

<br />

|                                   Returns                                    ||
|--------|----------------------------------------------------------------------|
| `long` | the current position in time of the animation in milliseconds <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 each of the child animations of this AnimatorSet. This value may be less than 0, which indicates that no duration has been set on this AnimatorSet and each of the child animations will use their own duration.

<br />

|                                                      Returns                                                      ||
|--------|-----------------------------------------------------------------------------------------------------------|
| `long` | The length of the animation, in milliseconds, of each of the child animations of this AnimatorSet. <br /> |

### getInterpolator

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

```
public TimeInterpolator getInterpolator ()
```

Returns the timing interpolator that this animation uses.

<br />

|                                                                      Returns                                                                       ||
|------------------------------------------------------------------------------------------------|----------------------------------------------------|
| [TimeInterpolator](https://developer.android.com/reference/android/animation/TimeInterpolator) | The timing interpolator for this animation. <br /> |

### 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[start()](https://developer.android.com/reference/android/animation/AnimatorSet#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[DURATION_INFINITE](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[start()](https://developer.android.com/reference/android/animation/Animator#start())is called.[DURATION_INFINITE](https://developer.android.com/reference/android/animation/Animator#DURATION_INFINITE)will be returned if the animation or any child animation repeats infinite times. <br /> |

### isRunning

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

```
public boolean isRunning ()
```

Returns true if any of the child animations of this AnimatorSet have been started and have not yet ended. Child animations will not be started until the AnimatorSet has gone past its initial delay set through[setStartDelay(long)](https://developer.android.com/reference/android/animation/AnimatorSet#setStartDelay(long)).

<br />

|                                                                     Returns                                                                      ||
|-----------|---------------------------------------------------------------------------------------------------------------------------------------|
| `boolean` | Whether this AnimatorSet has gone past the initial delay, and at least one child animation has been started and not yet ended. <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[createCircularReveal()](https://developer.android.com/reference/android/view/ViewAnimationUtils#createCircularReveal(android.view.View,%20int,%20int,%20float,%20float))), this state is a superset of[isRunning()](https://developer.android.com/reference/android/animation/Animator#isRunning()), because an Animator with a nonzero[startDelay](https://developer.android.com/reference/android/animation/Animator#getStartDelay())will return true for[isStarted()](https://developer.android.com/reference/android/animation/Animator#isStarted())during the delay phase, whereas[isRunning()](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 /> |

### 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[started](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[resume()](https://developer.android.com/reference/android/animation/Animator#resume()).

<br />

### play

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

```
public AnimatorSet.Builder play (Animator anim)
```

This method creates a`Builder`object, which is used to set up playing constraints. This initial`play()`method tells the`Builder`the animation that is the dependency for the succeeding commands to the`Builder`. For example, calling`play(a1).with(a2)`sets up the AnimatorSet to play`a1`and`a2`at the same time,`play(a1).before(a2)`sets up the AnimatorSet to play`a1`first, followed by`a2`, and`play(a1).after(a2)`sets up the AnimatorSet to play`a2`first, followed by`a1`.

Note that`play()`is the only way to tell the`Builder`the animation upon which the dependency is created, so successive calls to the various functions in`Builder`will all refer to the initial parameter supplied in`play()`as the dependency of the other animations. For example, calling`play(a1).before(a2).before(a3)`will play both`a2`and`a3`when a1 ends; it does not set up a dependency between`a2`and`a3`.

<br />

<br />

|                                                                                           Parameters                                                                                            ||
|--------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `anim` | `Animator`: The animation that is the dependency used in later calls to the methods in the returned`Builder`object. A null parameter will result in a null`Builder`return value. <br /> |

|                                                                                                                        Returns                                                                                                                         ||
|------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------|
| [AnimatorSet.Builder](https://developer.android.com/reference/android/animation/AnimatorSet.Builder) | Builder The object that constructs the AnimatorSet based on the dependencies outlined in the calls to`play`and the other methods in the`Builder` |

### playSequentially

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

```
public void playSequentially (List<Animator> items)
```

Sets up this AnimatorSet to play each of the supplied animations when the previous animation ends.

<br />

|                                   Parameters                                   ||
|---------|-----------------------------------------------------------------------|
| `items` | `List`: The animations that will be started one after another. <br /> |

### playSequentially

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

```
public void playSequentially (Animator... items)
```

Sets up this AnimatorSet to play each of the supplied animations when the previous animation ends.

<br />

|                                     Parameters                                     ||
|---------|---------------------------------------------------------------------------|
| `items` | `Animator`: The animations that will be started one after another. <br /> |

### playTogether

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

```
public void playTogether (Animator... items)
```

Sets up this AnimatorSet to play all of the supplied animations at the same time. This is equivalent to calling[play(android.animation.Animator)](https://developer.android.com/reference/android/animation/AnimatorSet#play(android.animation.Animator))with the first animator in the set and then[Builder.with(Animator)](https://developer.android.com/reference/android/animation/AnimatorSet.Builder#with(android.animation.Animator))with each of the other animators. Note that an Animator with a[startDelay](https://developer.android.com/reference/android/animation/Animator#setStartDelay(long))will not actually start until that delay elapses, which means that if the first animator in the list supplied to this constructor has a startDelay, none of the other animators will start until that first animator's startDelay has elapsed.

<br />

|                                   Parameters                                    ||
|---------|------------------------------------------------------------------------|
| `items` | `Animator`: The animations that will be started simultaneously. <br /> |

### playTogether

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

```
public void playTogether (Collection<Animator> items)
```

Sets up this AnimatorSet to play all of the supplied animations at the same time.

<br />

|                                    Parameters                                     ||
|---------|--------------------------------------------------------------------------|
| `items` | `Collection`: The animations that will be started simultaneously. <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 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void reverse ()
```

Plays the AnimatorSet in reverse. If the animation has been seeked to a specific play time using[setCurrentPlayTime(long)](https://developer.android.com/reference/android/animation/AnimatorSet#setCurrentPlayTime(long)), it will play backwards from the point seeked when reverse was called. Otherwise, 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.

Note: reverse is not supported for infinite AnimatorSet.

<br />

### setCurrentPlayTime

Added in[API level 26](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. On[Build.VERSION_CODES.UPSIDE_DOWN_CAKE](https://developer.android.com/reference/android/os/Build.VERSION_CODES#UPSIDE_DOWN_CAKE)and above, an AnimatorSet that hasn't been[start()](https://developer.android.com/reference/android/animation/AnimatorSet#start())ed, will issue[Animator.AnimatorListener.onAnimationStart(Animator, boolean)](https://developer.android.com/reference/android/animation/Animator.AnimatorListener#onAnimationStart(android.animation.Animator,%20boolean))and[Animator.AnimatorListener.onAnimationEnd(Animator, boolean)](https://developer.android.com/reference/android/animation/Animator.AnimatorListener#onAnimationEnd(android.animation.Animator,%20boolean))events.

<br />

|                                                                                                                           Parameters                                                                                                                            ||
|------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `playTime` | `long`: The time, in milliseconds, to which the animation is advanced or rewound. Unless the animation is reversing, the playtime is considered the time since the end of the start delay of the AnimatorSet in a forward playing direction. <br /> |

### setDuration

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

```
public AnimatorSet setDuration (long duration)
```

Sets the length of each of the current child animations of this AnimatorSet. By default, each child animation will use its own duration. If the duration is set on the AnimatorSet, then each child animation inherits this duration.

<br />

|                                                          Parameters                                                           ||
|------------|-------------------------------------------------------------------------------------------------------------------|
| `duration` | `long`: The length of the animation, in milliseconds, of each of the child animations of this AnimatorSet. <br /> |

|                                           Returns                                            ||
|--------------------------------------------------------------------------------------|--------|
| [AnimatorSet](https://developer.android.com/reference/android/animation/AnimatorSet) | <br /> |

### setInterpolator

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

```
public void setInterpolator (TimeInterpolator interpolator)
```

Sets the TimeInterpolator for all current[child animations](https://developer.android.com/reference/android/animation/AnimatorSet#getChildAnimations())of this AnimatorSet. The default value is null, which means that no interpolator is set on this AnimatorSet. Setting the interpolator to any non-null value will cause that interpolator to be set on the child animations when the set is started.

<br />

|                                                     Parameters                                                     ||
|----------------|----------------------------------------------------------------------------------------------------|
| `interpolator` | `TimeInterpolator`: the interpolator to be used by each child animation of this AnimatorSet <br /> |

### 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[start()](https://developer.android.com/reference/android/animation/AnimatorSet#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 /> |

### setTarget

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

```
public void setTarget (Object target)
```

Sets the target object for all current[child animations](https://developer.android.com/reference/android/animation/AnimatorSet#getChildAnimations())of this AnimatorSet that take targets ([ObjectAnimator](https://developer.android.com/reference/android/animation/ObjectAnimator)and AnimatorSet).

<br />

|                      Parameters                      ||
|----------|--------------------------------------------|
| `target` | `Object`: The object being animated <br /> |

### setupEndValues

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

```
public void setupEndValues ()
```

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

<br />

### setupStartValues

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

```
public void setupStartValues ()
```

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

<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[AnimatorListener.onAnimationStart(Animator)](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.

Starting this`AnimatorSet`will, in turn, start the animations for which it is responsible. The details of when exactly those animations are started depends on the dependency relationships that have been set up between the animations.**Note:** Manipulating AnimatorSet's lifecycle in the child animators' listener callbacks will lead to undefined behaviors. Also, AnimatorSet will ignore any seeking in the child animators once[start()](https://developer.android.com/reference/android/animation/AnimatorSet#start())is called.

<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                                                      ||
|--------------------------------------------------------------------|-----------------------------------------------|
| [String](https://developer.android.com/reference/java/lang/String) | a string representation of the object. <br /> |