Animator.AnimatorListener
public interface Animator.AnimatorListener
AnimatorListenerAdapter |
This adapter class provides empty implementations of the methods from |
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(@NonNull Animator animation)Notifies the cancellation of the animation. |
abstract void |
onAnimationEnd(@NonNull Animator animation)Notifies the end of the animation. |
default void |
onAnimationEnd(@NonNull Animator animation, boolean isReverse)Notifies the end of the animation. |
abstract void |
onAnimationRepeat(@NonNull Animator animation)Notifies the repetition of the animation. |
abstract void |
onAnimationStart(@NonNull Animator animation)Notifies the start of the animation. |
default void |
onAnimationStart(@NonNull Animator animation, boolean isReverse)Notifies the start of the animation as well as the animation's overall play direction. |
Public methods
onAnimationCancel
abstract void onAnimationCancel(@NonNull Animator animation)
Notifies the cancellation of the animation. This callback is not invoked for animations with repeat count set to INFINITE.
onAnimationEnd
abstract void onAnimationEnd(@NonNull Animator animation)
Notifies the end of the animation. This callback is not invoked for animations with repeat count set to INFINITE.
onAnimationEnd
default void onAnimationEnd(@NonNull 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. 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 not getting called.
onAnimationRepeat
abstract void onAnimationRepeat(@NonNull Animator animation)
Notifies the repetition of the animation.
onAnimationStart
abstract void onAnimationStart(@NonNull Animator animation)
Notifies the start of the animation.
onAnimationStart
default void onAnimationStart(@NonNull 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. 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 not getting called.