The Android Developer Challenge is back! Submit your idea before December 2.

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

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

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

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

doOnEnd

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

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

doOnPause

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

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

doOnResume

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

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

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