public interface

Animator.AnimatorListener

 androidx.core.animation.Animator.AnimatorListener

Subclasses:

AnimatorListenerAdapter

Overview

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

Summary

Methods
public voidonAnimationCancel(Animator animation)

Notifies the cancellation of the animation.

public voidonAnimationEnd(Animator animation)

Notifies the end of the animation.

public voidonAnimationEnd(Animator animation, boolean isReverse)

Notifies the end of the animation.

public voidonAnimationRepeat(Animator animation)

Notifies the repetition of the animation.

public voidonAnimationStart(Animator animation)

Notifies the start of the animation.

public voidonAnimationStart(Animator animation, boolean isReverse)

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

Methods

public 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 Animator.AnimatorListener.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 Animator.AnimatorListener.onAnimationStart(Animator) not getting called.

Parameters:

animation: The started animation.
isReverse: Whether the animation is playing in reverse.

public 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 Animator.AnimatorListener.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 Animator.AnimatorListener.onAnimationEnd(Animator) not getting called.

Parameters:

animation: The animation which reached its end.
isReverse: Whether the animation is playing in reverse.

public void onAnimationStart(Animator animation)

Notifies the start of the animation.

Parameters:

animation: The started animation.

public 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: The animation which reached its end.

public 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: The animation which was canceled.

public void onAnimationRepeat(Animator animation)

Notifies the repetition of the animation.

Parameters:

animation: The animation which was repeated