Stay organized with collections
Save and categorize content based on your preferences.
Transition.TransitionListener
public
static
interface
Transition.TransitionListener
android.transition.Transition.TransitionListener
|
Known indirect subclasses
|
A transition listener receives notifications from a transition.
Notifications indicate transition lifecycle events.
Summary
Public methods
onTransitionCancel
public abstract 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 |
Transition : The transition which was canceled. |
onTransitionEnd
public abstract 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, onTransitionEnd(android.transition.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
public abstract 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 |
Transition : The transition which was paused. |
onTransitionResume
public abstract 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 onTransitionPause(android.transition.Transition)
.
Parameters |
transition |
Transition : The transition which was resumed. |
onTransitionStart
public abstract void onTransitionStart (Transition transition)
Notification about the start of the transition.
Parameters |
transition |
Transition : The started transition. |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# Transition.TransitionListener\n\nAdded in [API level 19](/guide/topics/manifest/uses-sdk-element#ApiLevels) \nSummary: [Methods](#pubmethods) \n\nTransition.TransitionListener\n=============================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/transition/Transition.TransitionListener \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\nstatic\n\n\ninterface\nTransition.TransitionListener\n`\n\n\n`\n\n\n`\n\n|--------------------------------------------------|\n| android.transition.Transition.TransitionListener |\n\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Known indirect subclasses [TransitionListenerAdapter](/reference/android/transition/TransitionListenerAdapter) |--------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [TransitionListenerAdapter](/reference/android/transition/TransitionListenerAdapter) | This adapter class provides empty implementations of the methods from [Transition.TransitionListener](/reference/android/transition/Transition.TransitionListener). | |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nA transition listener receives notifications from a transition.\nNotifications indicate transition lifecycle events.\n\nSummary\n-------\n\n| ### Public methods ||\n|------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract void` | ` `[onTransitionCancel](/reference/android/transition/Transition.TransitionListener#onTransitionCancel(android.transition.Transition))`(`[Transition](/reference/android/transition/Transition)` transition) ` Notification about the cancellation of the transition. |\n| ` abstract void` | ` `[onTransitionEnd](/reference/android/transition/Transition.TransitionListener#onTransitionEnd(android.transition.Transition))`(`[Transition](/reference/android/transition/Transition)` transition) ` Notification about the end of the transition. |\n| ` abstract void` | ` `[onTransitionPause](/reference/android/transition/Transition.TransitionListener#onTransitionPause(android.transition.Transition))`(`[Transition](/reference/android/transition/Transition)` transition) ` Notification when a transition is paused. |\n| ` abstract void` | ` `[onTransitionResume](/reference/android/transition/Transition.TransitionListener#onTransitionResume(android.transition.Transition))`(`[Transition](/reference/android/transition/Transition)` transition) ` Notification when a transition is resumed. |\n| ` abstract void` | ` `[onTransitionStart](/reference/android/transition/Transition.TransitionListener#onTransitionStart(android.transition.Transition))`(`[Transition](/reference/android/transition/Transition)` transition) ` Notification about the start of the transition. |\n\nPublic methods\n--------------\n\n### onTransitionCancel\n\nAdded in [API level 19](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract void onTransitionCancel (Transition transition)\n```\n\nNotification about the cancellation of the transition.\nNote that cancel may be called by a parent [TransitionSet](/reference/android/transition/TransitionSet) on\na child transition which has not yet started. This allows the child\ntransition to restore state on target objects which was set at\n[createAnimator()](/reference/android/transition/Transition#createAnimator(android.view.ViewGroup,%20android.transition.TransitionValues,%20android.transition.TransitionValues)) time.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|--------------|---------------------------------------------------------|\n| `transition` | `Transition`: The transition which was canceled. \u003cbr /\u003e |\n\n### onTransitionEnd\n\nAdded in [API level 19](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract void onTransitionEnd (Transition transition)\n```\n\nNotification about the end of the transition. Canceled transitions\nwill always notify listeners of both the cancellation and end\nevents. That is, [onTransitionEnd(android.transition.Transition)](/reference/android/transition/Transition.TransitionListener#onTransitionEnd(android.transition.Transition)) is always called,\nregardless of whether the transition was canceled or played\nthrough to completion.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|--------------|------------------------------------------------------------|\n| `transition` | `Transition`: The transition which reached its end. \u003cbr /\u003e |\n\n### onTransitionPause\n\nAdded in [API level 19](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract void onTransitionPause (Transition transition)\n```\n\nNotification when a transition is paused.\nNote that createAnimator() may be called by a parent [TransitionSet](/reference/android/transition/TransitionSet) on\na child transition which has not yet started. This allows the child\ntransition to restore state on target objects which was set at\n[createAnimator()](/reference/android/transition/Transition#createAnimator(android.view.ViewGroup,%20android.transition.TransitionValues,%20android.transition.TransitionValues)) time.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|--------------|-------------------------------------------------------|\n| `transition` | `Transition`: The transition which was paused. \u003cbr /\u003e |\n\n### onTransitionResume\n\nAdded in [API level 19](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract void onTransitionResume (Transition transition)\n```\n\nNotification when a transition is resumed.\nNote that resume() may be called by a parent [TransitionSet](/reference/android/transition/TransitionSet) on\na child transition which has not yet started. This allows the child\ntransition to restore state which may have changed in an earlier call\nto [onTransitionPause(android.transition.Transition)](/reference/android/transition/Transition.TransitionListener#onTransitionPause(android.transition.Transition)).\n\n\u003cbr /\u003e\n\n| Parameters ||\n|--------------|--------------------------------------------------------|\n| `transition` | `Transition`: The transition which was resumed. \u003cbr /\u003e |\n\n### onTransitionStart\n\nAdded in [API level 19](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract void onTransitionStart (Transition transition)\n```\n\nNotification about the start of the transition.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|--------------|----------------------------------------------|\n| `transition` | `Transition`: The started transition. \u003cbr /\u003e |"]]