# Transition.EpicenterCallback

Added in[API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Summary:[Ctors](https://developer.android.com/reference/android/transition/Transition.EpicenterCallback#pubctors)\|[Methods](https://developer.android.com/reference/android/transition/Transition.EpicenterCallback#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/transition/Transition.EpicenterCallback#inhmethods)  

# Transition.EpicenterCallback

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/android/transition/Transition.EpicenterCallback "View this page in Kotlin")\|Java

`
public
static

abstract
class
Transition.EpicenterCallback
`  
`

extends `[Object](https://developer.android.com/reference/java/lang/Object)`


``


`

|---|-------------------------------------------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.transition.Transition.EpicenterCallback |

<br />

*** ** * ** ***

Class to get the epicenter of Transition. Use[Transition.setEpicenterCallback(android.transition.Transition.EpicenterCallback)](https://developer.android.com/reference/android/transition/Transition#setEpicenterCallback(android.transition.Transition.EpicenterCallback))to set the callback used to calculate the epicenter of the Transition. Override[Transition.getEpicenter()](https://developer.android.com/reference/android/transition/Transition#getEpicenter())to return the rectangular region in screen coordinates of the epicenter of the transition.  
**See also:**

- [Transition.setEpicenterCallback(android.transition.Transition.EpicenterCallback)](https://developer.android.com/reference/android/transition/Transition#setEpicenterCallback(android.transition.Transition.EpicenterCallback))

## Summary

|                                                           ### Public constructors                                                           ||
|------------------------------------------------------------------------------------------------------------------------------------------|---|
| ` `[EpicenterCallback](https://developer.android.com/reference/android/transition/Transition.EpicenterCallback#EpicenterCallback())`() ` |

|                                                                                                                                                                                                               ### Public methods                                                                                                                                                                                                               ||
|-----------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` abstract `[Rect](https://developer.android.com/reference/android/graphics/Rect) | ` `[onGetEpicenter](https://developer.android.com/reference/android/transition/Transition.EpicenterCallback#onGetEpicenter(android.transition.Transition))`(`[Transition](https://developer.android.com/reference/android/transition/Transition)` transition) ` Implementers must override to return the epicenter of the Transition in screen coordinates. |

| ### Inherited methods |
|-----------------------|---|
| From class` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object)` ` |--------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](https://developer.android.com/reference/java/lang/Object)          | ` `[clone](https://developer.android.com/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object.                                                                                                                                                      | | ` boolean`                                                                     | ` `[equals](https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` obj) ` Indicates whether some other object is "equal to" this one.                                           | | ` void`                                                                        | ` `[finalize](https://developer.android.com/reference/java/lang/Object#finalize())`() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.                                                          | | ` final `[Class](https://developer.android.com/reference/java/lang/Class)`<?>` | ` `[getClass](https://developer.android.com/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this`Object`.                                                                                                                                                | | ` int`                                                                         | ` `[hashCode](https://developer.android.com/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object.                                                                                                                                                 | | ` final void`                                                                  | ` `[notify](https://developer.android.com/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor.                                                                                                                            | | ` final void`                                                                  | ` `[notifyAll](https://developer.android.com/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor.                                                                                                                         | | ` `[String](https://developer.android.com/reference/java/lang/String)          | ` `[toString](https://developer.android.com/reference/java/lang/Object#toString())`() ` Returns a string representation of the object.                                                                                                                                            | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long,%20int))`(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed. | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long))`(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed.                   | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait())`() ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*.                                                                                             | ||

## Public constructors

### EpicenterCallback

```
public EpicenterCallback ()
```

<br />

<br />

## Public methods

### onGetEpicenter

Added in[API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public abstract Rect onGetEpicenter (Transition transition)
```

Implementers must override to return the epicenter of the Transition in screen coordinates. Transitions like[Explode](https://developer.android.com/reference/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[Fade](https://developer.android.com/reference/android/transition/Fade)pay no attention to the epicenter.

<br />

|                                     Parameters                                     ||
|--------------|----------------------------------------------------------------------|
| `transition` | `Transition`: The transition for which the epicenter applies. <br /> |

|                                                                            Returns                                                                             ||
|-----------------------------------------------------------------------|-----------------------------------------------------------------------------------------|
| [Rect](https://developer.android.com/reference/android/graphics/Rect) | The Rect region of the epicenter of`transition`or null if there is no epicenter. <br /> |