core-ktx / androidx.transition / android.transition.Transition

Extensions for android.transition.Transition

addListener

fun Transition.addListener(onEnd: (transition: Transition) -> Unit = null, onStart: (transition: Transition) -> Unit = null, onCancel: (transition: Transition) -> Unit = null, onResume: (transition: Transition) -> Unit = null, onPause: (transition: Transition) -> Unit = null): Unit

Add a listener to this Transition using the provided actions.

doOnCancel

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

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

doOnEnd

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

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

doOnPause

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

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

doOnResume

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

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

doOnStart

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

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