Skip to content

Most visited

Recently visited

navigation
added in API level 11

Animator.AnimatorListener

public static interface Animator.AnimatorListener

android.animation.Animator.AnimatorListener
Known Indirect Subclasses


An animation listener receives notifications from an animation. Notifications indicate animation related events, such as the end or the repetition of the animation.

Summary

Public methods

abstract void onAnimationCancel(Animator animation)

Notifies the cancellation of the animation.

abstract void onAnimationEnd(Animator animation)

Notifies the end of the animation.

default void onAnimationEnd(Animator animation, boolean isReverse)

Notifies the end of the animation.

abstract void onAnimationRepeat(Animator animation)

Notifies the repetition of the animation.

abstract void onAnimationStart(Animator animation)

Notifies the start of the animation.

default void onAnimationStart(Animator animation, boolean isReverse)

Notifies the start of the animation as well as the animation's overall play direction.

Public methods

onAnimationCancel

added in API level 11
void onAnimationCancel (Animator animation)

Notifies the cancellation of the animation. This callback is not invoked for animations with repeat count set to INFINITE.

Parameters
animation Animator: The animation which was canceled.

onAnimationEnd

added in API level 11
void onAnimationEnd (Animator animation)

Notifies the end of the animation. This callback is not invoked for animations with repeat count set to INFINITE.

Parameters
animation Animator: The animation which reached its end.

onAnimationEnd

added in API level 26
void onAnimationEnd (Animator animation, 
                boolean isReverse)

Notifies the end of the animation. This callback is not invoked for animations with repeat count set to INFINITE.

This method's default behavior is to call onAnimationEnd(Animator). This method can be overridden, though not required, to get the additional play direction info when an animation ends. Skipping calling super when overriding this method results in onAnimationEnd(Animator) not getting called.

Parameters
animation Animator: The animation which reached its end.

isReverse boolean: Whether the animation is playing in reverse.

onAnimationRepeat

added in API level 11
void onAnimationRepeat (Animator animation)

Notifies the repetition of the animation.

Parameters
animation Animator: The animation which was repeated.

onAnimationStart

added in API level 11
void onAnimationStart (Animator animation)

Notifies the start of the animation.

Parameters
animation Animator: The started animation.

onAnimationStart

added in API level 26
void onAnimationStart (Animator animation, 
                boolean isReverse)

Notifies the start of the animation as well as the animation's overall play direction. This method's default behavior is to call onAnimationStart(Animator). This method can be overridden, though not required, to get the additional play direction info when an animation starts. Skipping calling super when overriding this method results in onAnimationStart(Animator) not getting called.

Parameters
animation Animator: The started animation.

isReverse boolean: Whether the animation is playing in reverse.

This site uses cookies to store your preferences for site-specific language and display options.

Get the latest Android developer news and tips that will help you find success on Google Play.

* Required Fields

Hooray!

Browse this site in ?

You requested a page in , but your language preference for this site is .

Would you like to change your language preference and browse this site in ? If you want to change your language preference later, use the language menu at the bottom of each page.

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a one-minute survey?
Help us improve Android tools and documentation.