public abstract class TransitionChangeHandler extends ControllerChangeHandler
ControllerChangeHandler that facilitates using Transitions to replace Controller Views.| Modifier and Type | Class and Description |
|---|---|
static interface |
TransitionChangeHandler.OnTransitionPreparedListener |
ControllerChangeHandler.ControllerChangeCompletedListener, ControllerChangeHandler.ControllerChangeListener| Constructor and Description |
|---|
TransitionChangeHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
completeImmediately()
Will be called on change handlers that push a controller if the controller being pushed is
needs to be attached immediately, without any animations or transitions.
|
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.
|
protected abstract 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 |
performChange(android.view.ViewGroup container,
android.view.View from,
android.view.View to,
boolean isPush,
ControllerChangeHandler.ControllerChangeCompletedListener changeListener)
Responsible for swapping Views from one Controller to another.
|
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.
|
boolean |
removesFromViewOnPush() |
copy, fromBundle, isReusable, restoreFromBundle, saveToBundle, setForceRemoveViewOnPushprotected abstract android.transition.Transition getTransition(android.view.ViewGroup container,
android.view.View from,
android.view.View to,
boolean isPush)
container - 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 onAbortPush(ControllerChangeHandler newHandler, Controller newTop)
ControllerChangeHandleronAbortPush in class ControllerChangeHandlernewHandler - 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 void completeImmediately()
ControllerChangeHandlercompleteImmediately in class ControllerChangeHandlerpublic void performChange(android.view.ViewGroup container,
android.view.View from,
android.view.View to,
boolean isPush,
ControllerChangeHandler.ControllerChangeCompletedListener changeListener)
ControllerChangeHandlerperformChange in class ControllerChangeHandlercontainer - The container these Views are hosted in.from - 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 pop.changeListener - This listener must be called when any transitions or animations are completed.public boolean removesFromViewOnPush()
removesFromViewOnPush in class ControllerChangeHandlerpublic void prepareForTransition(android.view.ViewGroup container,
android.view.View from,
android.view.View to,
android.transition.Transition transition,
boolean isPush,
TransitionChangeHandler.OnTransitionPreparedListener onTransitionPreparedListener)
onTransitionPreparedListener is called.container - 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 void executePropertyChanges(android.view.ViewGroup container,
android.view.View from,
android.view.View to,
android.transition.Transition transition,
boolean isPush)
container - 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 pop