androidx.core.animation

Extension functions summary

For android.animation.Animator
AnimatorListener
Animator.doOnEnd(action: (animator: Animator) -> Unit)

Add an action which will be invoked when the animation has ended.

AnimatorListener
Animator.doOnStart(action: (animator: Animator) -> Unit)

Add an action which will be invoked when the animation has started.

AnimatorListener
Animator.doOnCancel(action: (animator: Animator) -> Unit)

Add an action which will be invoked when the animation has been cancelled.

AnimatorListener
Animator.doOnRepeat(action: (animator: Animator) -> Unit)

Add an action which will be invoked when the animation has repeated.

AnimatorPauseListener
Animator.doOnResume(action: (animator: Animator) -> Unit)

Add an action which will be invoked when the animation has resumed after a pause.

AnimatorPauseListener
Animator.doOnPause(action: (animator: Animator) -> Unit)

Add an action which will be invoked when the animation has been paused.

AnimatorListener
Animator.addListener(onEnd: (animator: Animator) -> Unit = null, onStart: (animator: Animator) -> Unit = null, onCancel: (animator: Animator) -> Unit = null, onRepeat: (animator: Animator) -> Unit = null)

Add a listener to this Animator using the provided actions.

AnimatorPauseListener
Animator.addPauseListener(onResume: (animator: Animator) -> Unit = null, onPause: (animator: Animator) -> Unit = null)

Add a pause and resume listener to this Animator using the provided actions.

Extension functions

addListener

fun Animator.addListener(onEnd: (animator: Animator) -> Unit = null, onStart: (animator: Animator) -> Unit = null, onCancel: (animator: Animator) -> Unit = null, onRepeat: (animator: Animator) -> Unit = null): AnimatorListener

Add a listener to this Animator using the provided actions.

addPauseListener

fun Animator.addPauseListener(onResume: (animator: Animator) -> Unit = null, onPause: (animator: Animator) -> Unit = null): AnimatorPauseListener

Add a pause and resume listener to this Animator using the provided actions.

doOnCancel

fun Animator.doOnCancel(action: (animator: Animator) -> Unit): AnimatorListener

Add an action which will be invoked when the animation has been cancelled.

Return
the Animator.AnimatorListener added to the Animator

See Also

doOnEnd

fun Animator.doOnEnd(action: (animator: Animator) -> Unit): AnimatorListener

Add an action which will be invoked when the animation has ended.

Return
the Animator.AnimatorListener added to the Animator

See Also

doOnPause

fun Animator.doOnPause(action: (animator: Animator) -> Unit): AnimatorPauseListener

Add an action which will be invoked when the animation has been paused.

Return
the Animator.AnimatorPauseListener added to the Animator

See Also

doOnRepeat

fun Animator.doOnRepeat(action: (animator: Animator) -> Unit): AnimatorListener

Add an action which will be invoked when the animation has repeated.

Return
the Animator.AnimatorListener added to the Animator

doOnResume

fun Animator.doOnResume(action: (animator: Animator) -> Unit): AnimatorPauseListener

Add an action which will be invoked when the animation has resumed after a pause.

Return
the Animator.AnimatorPauseListener added to the Animator

See Also

doOnStart

fun Animator.doOnStart(action: (animator: Animator) -> Unit): AnimatorListener

Add an action which will be invoked when the animation has started.

Return
the Animator.AnimatorListener added to the Animator

See Also