Stay organized with collections
Save and categorize content based on your preferences.
TransitionListenerAdapter
abstract 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 methods |
open Unit |
Notification about the cancellation of the transition.
|
open Unit |
Notification about the end of the transition.
|
open Unit |
Notification when a transition is paused.
|
open Unit |
Notification when a transition is resumed.
|
open Unit |
Notification about the start of the transition.
|
Public constructors
TransitionListenerAdapter
TransitionListenerAdapter()
Public methods
onTransitionCancel
open 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
open 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(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
open 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
open 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(android.transition.Transition)
.
Parameters |
transition |
Transition!: The transition which was resumed. |
onTransitionStart
open fun onTransitionStart(transition: Transition!): Unit
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.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# TransitionListenerAdapter\n\nAdded in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nTransitionListenerAdapter\n=========================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/transition/TransitionListenerAdapter \"View this page in Java\") \n\n```\nabstract class TransitionListenerAdapter : Transition.TransitionListener\n```\n\n|---|---------------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.transition.TransitionListenerAdapter](#) |\n\nThis 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.\n\nSummary\n-------\n\n| Public constructors ||\n|----------------------------------------------------------------------|---|\n| [TransitionListenerAdapter](#TransitionListenerAdapter())`()` \u003cbr /\u003e |\n\n| Public methods ||\n|-----------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| open [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onTransitionCancel](#onTransitionCancel(android.transition.Transition))`(`transition:` `[Transition](/reference/kotlin/android/transition/Transition)!`)` Notification about the cancellation of the transition. |\n| open [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onTransitionEnd](#onTransitionEnd(android.transition.Transition))`(`transition:` `[Transition](/reference/kotlin/android/transition/Transition)!`)` Notification about the end of the transition. |\n| open [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onTransitionPause](#onTransitionPause(android.transition.Transition))`(`transition:` `[Transition](/reference/kotlin/android/transition/Transition)!`)` Notification when a transition is paused. |\n| open [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onTransitionResume](#onTransitionResume(android.transition.Transition))`(`transition:` `[Transition](/reference/kotlin/android/transition/Transition)!`)` Notification when a transition is resumed. |\n| open [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onTransitionStart](#onTransitionStart(android.transition.Transition))`(`transition:` `[Transition](/reference/kotlin/android/transition/Transition)!`)` Notification about the start of the transition. |\n\nPublic constructors\n-------------------\n\n### TransitionListenerAdapter\n\n```\nTransitionListenerAdapter()\n```\n\nPublic methods\n--------------\n\n### onTransitionCancel\n\nAdded in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun onTransitionCancel(transition: Transition!): Unit\n```\n\nNotification about the cancellation of the transition. Note that cancel may be called by a parent [TransitionSet](/reference/kotlin/android/transition/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()](/reference/kotlin/android/transition/Transition#createAnimator(android.view.ViewGroup,%20android.transition.TransitionValues,%20android.transition.TransitionValues)) time.\n\n| Parameters ||\n|--------------|----------------------------------------------------------------------------------------------------|\n| `transition` | [Transition](/reference/kotlin/android/transition/Transition)!: The transition which was canceled. |\n\n### onTransitionEnd\n\nAdded in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun onTransitionEnd(transition: Transition!): Unit\n```\n\nNotification 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)](/reference/kotlin/android/transition/Transition.TransitionListener#onTransitionEnd(android.transition.Transition)) is always called, regardless of whether the transition was canceled or played through to completion.\n\n| Parameters ||\n|--------------|-------------------------------------------------------------------------------------------------------|\n| `transition` | [Transition](/reference/kotlin/android/transition/Transition)!: The transition which reached its end. |\n\n### onTransitionPause\n\nAdded in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun onTransitionPause(transition: Transition!): Unit\n```\n\nNotification when a transition is paused. Note that createAnimator() may be called by a parent [TransitionSet](/reference/kotlin/android/transition/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()](/reference/kotlin/android/transition/Transition#createAnimator(android.view.ViewGroup,%20android.transition.TransitionValues,%20android.transition.TransitionValues)) time.\n\n| Parameters ||\n|--------------|--------------------------------------------------------------------------------------------------|\n| `transition` | [Transition](/reference/kotlin/android/transition/Transition)!: The transition which was paused. |\n\n### onTransitionResume\n\nAdded in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun onTransitionResume(transition: Transition!): Unit\n```\n\nNotification when a transition is resumed. Note that resume() may be called by a parent [TransitionSet](/reference/kotlin/android/transition/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)](/reference/kotlin/android/transition/Transition.TransitionListener#onTransitionPause(android.transition.Transition)).\n\n| Parameters ||\n|--------------|---------------------------------------------------------------------------------------------------|\n| `transition` | [Transition](/reference/kotlin/android/transition/Transition)!: The transition which was resumed. |\n\n### onTransitionStart\n\nAdded in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun onTransitionStart(transition: Transition!): Unit\n```\n\nNotification about the start of the transition.\n\n| Parameters ||\n|--------------|-----------------------------------------------------------------------------------------|\n| `transition` | [Transition](/reference/kotlin/android/transition/Transition)!: The started transition. |"]]