TransitionListenerAdapter


class TransitionListenerAdapter : Transition.TransitionListener


This adapter class provides empty implementations of the methods from . Any custom listener that cares only about a subset of the methods of this listener can simply subclass this adapter class instead of implementing the interface directly.

Summary

Public constructors

Public functions

Unit

Notification about the cancellation of the transition.

Unit

Notification about the end of the transition.

Unit

Notification when a transition is paused.

Unit

Notification when a transition is resumed.

Unit

Notification about the start of the transition.

Inherited functions

From androidx.transition.Transition.TransitionListener
Unit
onTransitionEnd(transition: Transition, isReverse: Boolean)

Notification about the end of the transition.

Unit
onTransitionStart(transition: Transition, isReverse: Boolean)

Notification about the start of the transition.

Public constructors

TransitionListenerAdapter

Added in 1.0.0
TransitionListenerAdapter()

Public functions

onTransitionCancel

Added in 1.6.0-alpha01
fun onTransitionCancel(transition: Transition): Unit

Notification about the cancellation of the transition. Note that cancel may be called by a parent TransitionSet on a child transition which has not yet started. This allows the child transition to restore state on target objects which was set at createAnimator() time.

Parameters
transition: Transition

The transition which was canceled.

onTransitionEnd

Added in 1.6.0-alpha01
fun onTransitionEnd(transition: Transition): Unit

Notification about the end of the transition. Canceled transitions will always notify listeners of both the cancellation and end events. That is, onTransitionEnd is always called, regardless of whether the transition was canceled or played through to completion.

Parameters
transition: Transition

The transition which reached its end.

onTransitionPause

Added in 1.6.0-alpha01
fun onTransitionPause(transition: Transition): Unit

Notification when a transition is paused. Note that createAnimator() may be called by a parent TransitionSet on a child transition which has not yet started. This allows the child transition to restore state on target objects which was set at createAnimator() time.

Parameters
transition: Transition

The transition which was paused.

onTransitionResume

Added in 1.6.0-alpha01
fun onTransitionResume(transition: Transition): Unit

Notification when a transition is resumed. Note that resume() may be called by a parent TransitionSet on a child transition which has not yet started. This allows the child transition to restore state which may have changed in an earlier call to onTransitionPause.

Parameters
transition: Transition

The transition which was resumed.

onTransitionStart

Added in 1.6.0-alpha01
fun onTransitionStart(transition: Transition): Unit

Notification about the start of the transition.

Parameters
transition: Transition

The started transition.