Google is committed to advancing racial equity for Black communities. See how.

AnimatorListenerAdapter

abstract class AnimatorListenerAdapter : Animator.AnimatorListener, Animator.AnimatorPauseListener
kotlin.Any
   ↳ androidx.core.animation.AnimatorListenerAdapter

This adapter class provides empty implementations of the methods from Animator.AnimatorListener. Any custom listener that cares only about a subset of the methods of this listener can simply subclass this adapter class instead of implementing the interface directly.

Summary

Public constructors

This adapter class provides empty implementations of the methods from Animator.AnimatorListener.

Public methods
open Unit
onAnimationCancel(@NonNull animation: Animator)

Notifies the cancellation of the animation.

open Unit
onAnimationEnd(@NonNull animation: Animator)

Notifies the end of the animation.

open Unit
onAnimationPause(@NonNull animation: Animator)

Notifies that the animation was paused.

open Unit
onAnimationRepeat(@NonNull animation: Animator)

Notifies the repetition of the animation.

open Unit
onAnimationResume(@NonNull animation: Animator)

Notifies that the animation was resumed, after being previously paused.

open Unit
onAnimationStart(@NonNull animation: Animator)

Notifies the start of the animation.

Inherited functions

Public constructors

<init>

AnimatorListenerAdapter()

This adapter class provides empty implementations of the methods from Animator.AnimatorListener. Any custom listener that cares only about a subset of the methods of this listener can simply subclass this adapter class instead of implementing the interface directly.

Public methods

onAnimationCancel

open fun onAnimationCancel(@NonNull animation: Animator): Unit

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

open fun onAnimationEnd(@NonNull animation: Animator): Unit

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.

onAnimationPause

open fun onAnimationPause(@NonNull animation: Animator): Unit

Notifies that the animation was paused.

Parameters
animation Animator: The animaton being paused.

onAnimationRepeat

open fun onAnimationRepeat(@NonNull animation: Animator): Unit

Notifies the repetition of the animation.

Parameters
animation Animator: The animation which was repeated

onAnimationResume

open fun onAnimationResume(@NonNull animation: Animator): Unit

Notifies that the animation was resumed, after being previously paused.

Parameters
animation Animator: The animation being resumed.

onAnimationStart

open fun onAnimationStart(@NonNull animation: Animator): Unit

Notifies the start of the animation.

Parameters
animation Animator: The started animation.