Stay organized with collections
Save and categorize content based on your preferences.
EpicenterCallback
abstract class EpicenterCallback
Class to get the epicenter of Transition. Use setEpicenterCallback(android.transition.Transition.EpicenterCallback)
to set the callback used to calculate the epicenter of the Transition. Override getEpicenter()
to return the rectangular region in screen coordinates of the epicenter of the transition.
Summary
Public methods |
abstract Rect! |
Implementers must override to return the epicenter of the Transition in screen coordinates.
|
Public constructors
EpicenterCallback
EpicenterCallback()
Public methods
onGetEpicenter
abstract fun onGetEpicenter(transition: Transition!): Rect!
Implementers must override to return the epicenter of the Transition in screen coordinates. Transitions like android.transition.Explode
depend upon an epicenter for the Transition. In Explode, Views move toward or away from the center of the epicenter Rect along the vector between the epicenter and the center of the View appearing and disappearing. Some Transitions, such as android.transition.Fade
pay no attention to the epicenter.
Parameters |
transition |
Transition!: The transition for which the epicenter applies. |
Return |
Rect! |
The Rect region of the epicenter of transition or null if there is no epicenter. |
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,["# Transition.EpicenterCallback\n\nAdded in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nEpicenterCallback\n=================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/transition/Transition.EpicenterCallback \"View this page in Java\") \n\n```\nabstract class EpicenterCallback\n```\n\n|---|------------------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.transition.Transition.EpicenterCallback](#) |\n\nClass to get the epicenter of Transition. Use [setEpicenterCallback(android.transition.Transition.EpicenterCallback)](/reference/kotlin/android/transition/Transition#setEpicenterCallback(android.transition.Transition.EpicenterCallback)) to set the callback used to calculate the epicenter of the Transition. Override [getEpicenter()](/reference/kotlin/android/transition/Transition#getEpicenter()) to return the rectangular region in screen coordinates of the epicenter of the transition.\n\nSummary\n-------\n\n| Public constructors ||\n|------------------------------------------------------|---|\n| [EpicenterCallback](#EpicenterCallback())`()` \u003cbr /\u003e |\n\n| Public methods ||\n|------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [Rect](../graphics/Rect.html#)! | [onGetEpicenter](#onGetEpicenter(android.transition.Transition))`(`transition:` `[Transition](/reference/kotlin/android/transition/Transition)!`)` Implementers must override to return the epicenter of the Transition in screen coordinates. |\n\nPublic constructors\n-------------------\n\n### EpicenterCallback\n\n```\nEpicenterCallback()\n```\n\nPublic methods\n--------------\n\n### onGetEpicenter\n\nAdded in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun onGetEpicenter(transition: Transition!): Rect!\n```\n\nImplementers must override to return the epicenter of the Transition in screen coordinates. Transitions like [android.transition.Explode](/reference/kotlin/android/transition/Explode) depend upon an epicenter for the Transition. In Explode, Views move toward or away from the center of the epicenter Rect along the vector between the epicenter and the center of the View appearing and disappearing. Some Transitions, such as [android.transition.Fade](/reference/kotlin/android/transition/Fade) pay no attention to the epicenter.\n\n| Parameters ||\n|--------------|-----------------------------------------------------------------------------------------------------------------|\n| `transition` | [Transition](/reference/kotlin/android/transition/Transition)!: The transition for which the epicenter applies. |\n\n| Return ||\n|---------------------------------|------------------------------------------------------------------------------------|\n| [Rect](../graphics/Rect.html#)! | The Rect region of the epicenter of `transition` or null if there is no epicenter. |"]]