Transition.TransitionListener


public interface Transition.TransitionListener

Known direct subclasses
TransitionListenerAdapter

This adapter class provides empty implementations of the methods from .


A transition listener receives notifications from a transition. Notifications indicate transition lifecycle events.

Summary

Public methods

abstract void

Notification about the cancellation of the transition.

abstract void

Notification about the end of the transition.

default void
onTransitionEnd(@NonNull Transition transition, boolean isReverse)

Notification about the end of the transition.

abstract void

Notification when a transition is paused.

abstract void

Notification when a transition is resumed.

abstract void

Notification about the start of the transition.

default void
onTransitionStart(@NonNull Transition transition, boolean isReverse)

Notification about the start of the transition.

Public methods

onTransitionCancel

Added in 1.0.0
abstract void onTransitionCancel(@NonNull Transition transition)

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
@NonNull Transition transition

The transition which was canceled.

onTransitionEnd

Added in 1.0.0
abstract void onTransitionEnd(@NonNull Transition transition)

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
@NonNull Transition transition

The transition which reached its end.

onTransitionEnd

Added in 1.5.1
default void onTransitionEnd(@NonNull Transition transition, boolean isReverse)

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. Canceled transitions will have isReverse set to false.

Parameters
@NonNull Transition transition

The transition which reached its end.

boolean isReverse

true when seeking the transition backwards past the start.

onTransitionPause

Added in 1.0.0
abstract void onTransitionPause(@NonNull Transition transition)

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
@NonNull Transition transition

The transition which was paused.

onTransitionResume

Added in 1.0.0
abstract void onTransitionResume(@NonNull Transition transition)

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
@NonNull Transition transition

The transition which was resumed.

onTransitionStart

Added in 1.0.0
abstract void onTransitionStart(@NonNull Transition transition)

Notification about the start of the transition.

Parameters
@NonNull Transition transition

The started transition.

onTransitionStart

Added in 1.5.1
default void onTransitionStart(@NonNull Transition transition, boolean isReverse)

Notification about the start of the transition.

Parameters
@NonNull Transition transition

The started transition.

boolean isReverse

true when seeking the transition backwards from the end.