androidx.core.transition

Extension functions summary

For android.transition.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.

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

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

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

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

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

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

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

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

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

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

Extension functions

addListener

@RequiresApi(19) 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 = {}
): TransitionListener

Add a listener to this Transition using the provided actions.

doOnCancel

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

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

doOnEnd

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

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

doOnPause

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

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

doOnResume

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

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

doOnStart

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

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