androidx.core.transition


Extension functions summary

inline Transition.TransitionListener
Transition.addListener(
    crossinline onEnd: (transition: Transition) -> Unit,
    crossinline onStart: (transition: Transition) -> Unit,
    crossinline onCancel: (transition: Transition) -> Unit,
    crossinline onResume: (transition: Transition) -> Unit,
    crossinline onPause: (transition: Transition) -> Unit
)

Add a listener to this Transition using the provided actions.

inline Transition.TransitionListener
Transition.doOnCancel(
    crossinline action: (transition: Transition) -> Unit
)

Add an action which will be invoked when this transition has been cancelled.

inline Transition.TransitionListener
Transition.doOnEnd(crossinline action: (transition: Transition) -> Unit)

Add an action which will be invoked when this transition has ended.

inline Transition.TransitionListener
Transition.doOnPause(crossinline action: (transition: Transition) -> Unit)

Add an action which will be invoked when this transition has been paused.

inline Transition.TransitionListener
Transition.doOnResume(
    crossinline action: (transition: Transition) -> Unit
)

Add an action which will be invoked when this transition has resumed after a pause.

inline Transition.TransitionListener
Transition.doOnStart(crossinline action: (transition: Transition) -> Unit)

Add an action which will be invoked when this transition has started.

Extension functions

addListener

inline fun Transition.addListener(
    crossinline onEnd: (transition: Transition) -> Unit = {},
    crossinline onStart: (transition: Transition) -> Unit = {},
    crossinline onCancel: (transition: Transition) -> Unit = {},
    crossinline onResume: (transition: Transition) -> Unit = {},
    crossinline onPause: (transition: Transition) -> Unit = {}
): Transition.TransitionListener

Add a listener to this Transition using the provided actions.

doOnCancel

inline fun Transition.doOnCancel(
    crossinline action: (transition: Transition) -> Unit
): Transition.TransitionListener

Add an action which will be invoked when this transition has been cancelled.

doOnEnd

inline fun Transition.doOnEnd(crossinline action: (transition: Transition) -> Unit): Transition.TransitionListener

Add an action which will be invoked when this transition has ended.

doOnPause

inline fun Transition.doOnPause(crossinline action: (transition: Transition) -> Unit): Transition.TransitionListener

Add an action which will be invoked when this transition has been paused.

doOnResume

inline fun Transition.doOnResume(
    crossinline action: (transition: Transition) -> Unit
): Transition.TransitionListener

Add an action which will be invoked when this transition has resumed after a pause.

doOnStart

inline fun Transition.doOnStart(crossinline action: (transition: Transition) -> Unit): Transition.TransitionListener

Add an action which will be invoked when this transition has started.