TransitionListener
interface TransitionListener
androidx.transition.Transition.TransitionListener |
A transition listener receives notifications from a transition. Notifications indicate transition lifecycle events.
Summary
Public methods | |
---|---|
abstract Unit |
onTransitionCancel(@NonNull transition: Transition) Notification about the cancellation of the transition. |
abstract Unit |
onTransitionEnd(@NonNull transition: Transition) Notification about the end of the transition. |
abstract Unit |
onTransitionPause(@NonNull transition: Transition) Notification when a transition is paused. |
abstract Unit |
onTransitionResume(@NonNull transition: Transition) Notification when a transition is resumed. |
abstract Unit |
onTransitionStart(@NonNull transition: Transition) Notification about the start of the transition. |
Public methods
onTransitionCancel
abstract fun onTransitionCancel(@NonNull 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
abstract fun onTransitionEnd(@NonNull 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(Transition)
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
abstract fun onTransitionPause(@NonNull 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
abstract fun onTransitionResume(@NonNull 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(Transition)
.
Parameters | |
---|---|
transition |
Transition: The transition which was resumed. |
onTransitionStart
abstract fun onTransitionStart(@NonNull transition: Transition): Unit
Notification about the start of the transition.
Parameters | |
---|---|
transition |
Transition: The started transition. |