public interface

Transition.TransitionListener

 androidx.transition.Transition.TransitionListener

Subclasses:

TransitionListenerAdapter

Overview

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

Summary

Methods
public voidonTransitionCancel(Transition transition)

Notification about the cancellation of the transition.

public voidonTransitionEnd(Transition transition)

Notification about the end of the transition.

public voidonTransitionEnd(Transition transition, boolean isReverse)

Notification about the end of the transition.

public voidonTransitionPause(Transition transition)

Notification when a transition is paused.

public voidonTransitionResume(Transition transition)

Notification when a transition is resumed.

public voidonTransitionStart(Transition transition)

Notification about the start of the transition.

public voidonTransitionStart(Transition transition, boolean isReverse)

Notification about the start of the transition.

Methods

public void onTransitionStart(Transition transition)

Notification about the start of the transition.

Parameters:

transition: The started transition.

public void onTransitionStart(Transition transition, boolean isReverse)

Notification about the start of the transition.

Parameters:

transition: The started transition.
isReverse: true when seeking the transition backwards from the end.

public void onTransitionEnd(Transition transition)

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

Parameters:

transition: The transition which reached its end.

public void onTransitionEnd(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, Transition.TransitionListener.onTransitionEnd(Transition, boolean) is always called, regardless of whether the transition was canceled or played through to completion. Canceled transitions will have isReverse set to false.

Parameters:

transition: The transition which reached its end.
isReverse: true when seeking the transition backwards past the start.

public void onTransitionCancel(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:

transition: The transition which was canceled.

public void onTransitionPause(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:

transition: The transition which was paused.

public void onTransitionResume(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 Transition.TransitionListener.onTransitionPause(Transition).

Parameters:

transition: The transition which was resumed.