Class to get the epicenter of Transition. Use
setEpicenterCallback(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.
Implementers must override to return the epicenter of the Transition in screen
coordinates. Transitions like 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
Fade pay no attention to the epicenter.
Parameters
transition
Transition: The transition for which the epicenter applies.
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 [version 26.1.0](/topic/libraries/support-library/revisions) \nbelongs to Maven artifact com.android.support:transition:28.0.0-alpha1 \nSummary: [Ctors](#pubctors) \\| [Methods](#pubmethods) \\| [Inherited Methods](#inhmethods) \\| [\\[Expand All\\]](#) \n\nTransition.EpicenterCallback\n============================\n\n| This package is part of the Android [support library](/topic/libraries/support-library) which is no longer maintained. The support library has been superseded by [AndroidX](/jetpack/androidx) which is part of [Jetpack](/jetpack). We recommend using the AndroidX libraries in all new projects. You should also consider [migrating](/jetpack/androidx/migrate) existing projects to AndroidX. To find the AndroidX class that maps to this deprecated class, see the AndroidX support library [class\n| mappings](/jetpack/androidx/migrate/class-mappings).\n\n\n`\npublic\nstatic\n\nabstract\nclass\nTransition.EpicenterCallback\n`\n\n\n`\n\nextends Object\n\n\n`\n\n`\n\n\n`\n\n|---|---------------------------------------------------------|\n| java.lang.Object ||\n| ↳ | android.support.transition.Transition.EpicenterCallback |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nClass to get the epicenter of Transition. Use\n[setEpicenterCallback(EpicenterCallback)](/reference/android/support/transition/Transition#setEpicenterCallback(android.support.transition.Transition.EpicenterCallback)) to set the callback used to calculate the\nepicenter of the Transition. Override [getEpicenter()](/reference/android/support/transition/Transition#getEpicenter()) to return the rectangular\nregion in screen coordinates of the epicenter of the transition. \n**See also:**\n\n- [setEpicenterCallback(EpicenterCallback)](/reference/android/support/transition/Transition#setEpicenterCallback(android.support.transition.Transition.EpicenterCallback))\n\nSummary\n-------\n\n| ### Public constructors ||\n|-------------------------------------------------------------------------------------------------------------------------------------------|---|\n| ` `[Transition.EpicenterCallback](/reference/android/support/transition/Transition.EpicenterCallback#Transition.EpicenterCallback())`() ` |\n\n| ### Public methods ||\n|----------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract `[Rect](https://developer.android.com/reference/android/graphics/Rect.html) | ` `[onGetEpicenter](/reference/android/support/transition/Transition.EpicenterCallback#onGetEpicenter(android.support.transition.Transition))`(`[Transition](/reference/android/support/transition/Transition)` transition) ` Implementers must override to return the epicenter of the Transition in screen coordinates. |\n\n| ### Inherited methods |\n|-----------------------|---|\n| From class ` java.lang.Object ` |-------------------|-------------------------------| | ` Object` | ` clone() ` | | ` boolean` | ` equals(Object arg0) ` | | ` void` | ` finalize() ` | | ` final Class\u003c?\u003e` | ` getClass() ` | | ` int` | ` hashCode() ` | | ` final void` | ` notify() ` | | ` final void` | ` notifyAll() ` | | ` String` | ` toString() ` | | ` final void` | ` wait(long arg0, int arg1) ` | | ` final void` | ` wait(long arg0) ` | | ` final void` | ` wait() ` | ||\n\nPublic constructors\n-------------------\n\n### Transition.EpicenterCallback\n\nadded in [version 26.1.0](/topic/libraries/support-library/revisions) \n\n```\nTransition.EpicenterCallback ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nPublic methods\n--------------\n\n### onGetEpicenter\n\nadded in [version 26.1.0](/topic/libraries/support-library/revisions) \n\n```\nRect onGetEpicenter (Transition transition)\n```\n\nImplementers must override to return the epicenter of the Transition in screen\ncoordinates. Transitions like [Explode](https://developer.android.com/reference/android/transition/Explode.html) depend upon\nan epicenter for the Transition. In Explode, Views move toward or away from the\ncenter of the epicenter Rect along the vector between the epicenter and the center\nof the View appearing and disappearing. Some Transitions, such as\n[Fade](https://developer.android.com/reference/android/transition/Fade.html) pay no attention to the epicenter.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|--------------|----------------------------------------------------------------------|\n| `transition` | `Transition`: The transition for which the epicenter applies. \u003cbr /\u003e |\n\n| Returns ||\n|----------------------------------------------------------------------------|-------------------------------------------------------------------------------------------|\n| [Rect](https://developer.android.com/reference/android/graphics/Rect.html) | The Rect region of the epicenter of `transition` or null if there is no epicenter. \u003cbr /\u003e |\n\n-\n\n Interfaces\n ----------\n\n - [Transition.TransitionListener](/reference/android/support/transition/Transition.TransitionListener)\n-\n\n Classes\n -------\n\n - [ArcMotion](/reference/android/support/transition/ArcMotion)\n - [AutoTransition](/reference/android/support/transition/AutoTransition)\n - [ChangeBounds](/reference/android/support/transition/ChangeBounds)\n - [ChangeClipBounds](/reference/android/support/transition/ChangeClipBounds)\n - [ChangeImageTransform](/reference/android/support/transition/ChangeImageTransform)\n - [ChangeScroll](/reference/android/support/transition/ChangeScroll)\n - [ChangeTransform](/reference/android/support/transition/ChangeTransform)\n - [CircularPropagation](/reference/android/support/transition/CircularPropagation)\n - [Explode](/reference/android/support/transition/Explode)\n - [Fade](/reference/android/support/transition/Fade)\n - [PathMotion](/reference/android/support/transition/PathMotion)\n - [PatternPathMotion](/reference/android/support/transition/PatternPathMotion)\n - [R](/reference/android/support/transition/R)\n - [R.attr](/reference/android/support/transition/R.attr)\n - [R.bool](/reference/android/support/transition/R.bool)\n - [R.color](/reference/android/support/transition/R.color)\n - [R.dimen](/reference/android/support/transition/R.dimen)\n - [R.drawable](/reference/android/support/transition/R.drawable)\n - [R.id](/reference/android/support/transition/R.id)\n - [R.integer](/reference/android/support/transition/R.integer)\n - [R.layout](/reference/android/support/transition/R.layout)\n - [R.string](/reference/android/support/transition/R.string)\n - [R.style](/reference/android/support/transition/R.style)\n - [R.styleable](/reference/android/support/transition/R.styleable)\n - [Scene](/reference/android/support/transition/Scene)\n - [SidePropagation](/reference/android/support/transition/SidePropagation)\n - [Slide](/reference/android/support/transition/Slide)\n - [Transition](/reference/android/support/transition/Transition)\n - [Transition.EpicenterCallback](/reference/android/support/transition/Transition.EpicenterCallback)\n - [TransitionInflater](/reference/android/support/transition/TransitionInflater)\n - [TransitionListenerAdapter](/reference/android/support/transition/TransitionListenerAdapter)\n - [TransitionManager](/reference/android/support/transition/TransitionManager)\n - [TransitionPropagation](/reference/android/support/transition/TransitionPropagation)\n - [TransitionSet](/reference/android/support/transition/TransitionSet)\n - [TransitionValues](/reference/android/support/transition/TransitionValues)\n - [Visibility](/reference/android/support/transition/Visibility)\n - [VisibilityPropagation](/reference/android/support/transition/VisibilityPropagation)"]]