public abstract class SharedElementTransitionChangeHandler extends TransitionChangeHandler
TransitionChangeHandler.OnTransitionPreparedListenerControllerChangeHandler.ControllerChangeCompletedListener, ControllerChangeHandler.ControllerChangeListener| Constructor and Description |
|---|
SharedElementTransitionChangeHandler() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addSharedElement(java.lang.String name)
Used to register an element that will take part in the shared element transition.
|
protected void |
addSharedElement(java.lang.String fromName,
java.lang.String toName)
Used to register an element that will take part in the shared element transition.
|
protected void |
addSharedElement(android.view.View sharedElement,
java.lang.String toName)
Used to register an element that will take part in the shared element transition.
|
boolean |
allowTransitionOverlap(boolean isPush)
Should return whether or not the the exit transition and enter transition should overlap.
|
abstract void |
configureSharedElements(android.view.ViewGroup container,
android.view.View from,
android.view.View to,
boolean isPush)
Will be called when views are ready to have their shared elements configured.
|
void |
executePropertyChanges(android.view.ViewGroup container,
android.view.View from,
android.view.View to,
android.transition.Transition transition,
boolean isPush)
This should set all view properties needed for the transition to work properly.
|
abstract android.transition.Transition |
getEnterTransition(android.view.ViewGroup container,
android.view.View from,
android.view.View to,
boolean isPush)
Should return the transition that will be used on the entering ("to") view, if one is desired.
|
android.app.SharedElementCallback |
getEnterTransitionCallback(android.view.ViewGroup container,
android.view.View from,
android.view.View to,
boolean isPush)
Should return a callback that can be used to customize transition behavior of the shared element transition for the "to" view.
|
abstract android.transition.Transition |
getExitTransition(android.view.ViewGroup container,
android.view.View from,
android.view.View to,
boolean isPush)
Should return the transition that will be used on the exiting ("from") view, if one is desired.
|
android.app.SharedElementCallback |
getExitTransitionCallback(android.view.ViewGroup container,
android.view.View from,
android.view.View to,
boolean isPush)
Should return a callback that can be used to customize transition behavior of the shared element transition for the "from" view.
|
abstract android.transition.Transition |
getSharedElementTransition(android.view.ViewGroup container,
android.view.View from,
android.view.View to,
boolean isPush)
Should return the transition that will be used on shared elements between the from and to views.
|
protected android.transition.Transition |
getTransition(android.view.ViewGroup container,
android.view.View from,
android.view.View to,
boolean isPush)
Should be overridden to return the Transition to use while replacing Views.
|
void |
onAbortPush(ControllerChangeHandler newHandler,
Controller newTop)
Will be called on change handlers that push a controller if the controller being pushed is
popped before it has completed.
|
void |
prepareForTransition(android.view.ViewGroup container,
android.view.View from,
android.view.View to,
android.transition.Transition transition,
boolean isPush,
TransitionChangeHandler.OnTransitionPreparedListener onTransitionPreparedListener)
Called before a transition occurs.
|
protected void |
waitOnSharedElementNamed(java.lang.String name)
The transition will be delayed until the view with the name passed in is available in the "to" hierarchy.
|
completeImmediately, performChange, removesFromViewOnPushcopy, fromBundle, isReusable, restoreFromBundle, saveToBundle, setForceRemoveViewOnPushpublic SharedElementTransitionChangeHandler()
protected final android.transition.Transition getTransition(android.view.ViewGroup container,
android.view.View from,
android.view.View to,
boolean isPush)
TransitionChangeHandlergetTransition in class TransitionChangeHandlercontainer - The container these Views are hosted infrom - The previous View in the container or null if there was no Controller before this transitionto - The next View that should be put in the container or null if no Controller is being transitioned toisPush - True if this is a push transaction, false if it's a poppublic void prepareForTransition(android.view.ViewGroup container,
android.view.View from,
android.view.View to,
android.transition.Transition transition,
boolean isPush,
TransitionChangeHandler.OnTransitionPreparedListener onTransitionPreparedListener)
TransitionChangeHandleronTransitionPreparedListener is called.prepareForTransition in class TransitionChangeHandlercontainer - The container these Views are hosted infrom - The previous View in the container or null if there was no Controller before this transitionto - The next View that should be put in the container or null if no Controller is being transitioned totransition - The transition that is being prepared forisPush - True if this is a push transaction, false if it's a poppublic final void executePropertyChanges(android.view.ViewGroup container,
android.view.View from,
android.view.View to,
android.transition.Transition transition,
boolean isPush)
TransitionChangeHandlerexecutePropertyChanges in class TransitionChangeHandlercontainer - The container these Views are hosted infrom - The previous View in the container or null if there was no Controller before this transitionto - The next View that should be put in the container or null if no Controller is being transitioned totransition - The transition with which TransitionManager.beginDelayedTransition has been called. This will be null only if another ControllerChangeHandler immediately overrides this one.isPush - True if this is a push transaction, false if it's a poppublic void onAbortPush(ControllerChangeHandler newHandler, Controller newTop)
ControllerChangeHandleronAbortPush in class TransitionChangeHandlernewHandler - The change handler that has caused this push to be abortednewTop - The Controller that will now be at the top of the backstack or null
if there will be no new Controller at the toppublic abstract void configureSharedElements(android.view.ViewGroup container,
android.view.View from,
android.view.View to,
boolean isPush)
public abstract android.transition.Transition getExitTransition(android.view.ViewGroup container,
android.view.View from,
android.view.View to,
boolean isPush)
public abstract android.transition.Transition getSharedElementTransition(android.view.ViewGroup container,
android.view.View from,
android.view.View to,
boolean isPush)
public abstract android.transition.Transition getEnterTransition(android.view.ViewGroup container,
android.view.View from,
android.view.View to,
boolean isPush)
public android.app.SharedElementCallback getExitTransitionCallback(android.view.ViewGroup container,
android.view.View from,
android.view.View to,
boolean isPush)
public android.app.SharedElementCallback getEnterTransitionCallback(android.view.ViewGroup container,
android.view.View from,
android.view.View to,
boolean isPush)
public boolean allowTransitionOverlap(boolean isPush)
protected final void addSharedElement(java.lang.String name)
name - The transition name that is used for both the entering and exiting views.protected final void addSharedElement(java.lang.String fromName,
java.lang.String toName)
fromName - The transition name used in the "from" viewtoName - The transition name used in the "to" viewprotected final void addSharedElement(android.view.View sharedElement,
java.lang.String toName)
sharedElement - The view from the "from" view that will take part in the shared element transitiontoName - The transition name used in the "to" viewprotected final void waitOnSharedElementNamed(java.lang.String name)