public class SimpleSwapChangeHandler extends ControllerChangeHandler implements android.view.View.OnAttachStateChangeListener
ControllerChangeHandler that will instantly swap Views with no animations or transitions.ControllerChangeHandler.ControllerChangeCompletedListener, ControllerChangeHandler.ControllerChangeListener| Constructor and Description |
|---|
SimpleSwapChangeHandler() |
SimpleSwapChangeHandler(boolean removesFromViewOnPush) |
| 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.
|
ControllerChangeHandler |
copy()
Returns a copy of this ControllerChangeHandler.
|
boolean |
isReusable()
Returns whether or not this is a reusable ControllerChangeHandler.
|
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 |
onViewAttachedToWindow(android.view.View v) |
void |
onViewDetachedFromWindow(android.view.View v) |
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.
|
boolean |
removesFromViewOnPush() |
void |
restoreFromBundle(android.os.Bundle bundle)
Restores data that was saved in the
ControllerChangeHandler.saveToBundle(Bundle bundle) method. |
void |
saveToBundle(android.os.Bundle bundle)
Saves any data about this handler to a Bundle in case the application is killed.
|
fromBundle, setForceRemoveViewOnPushpublic SimpleSwapChangeHandler()
public SimpleSwapChangeHandler(boolean removesFromViewOnPush)
public void saveToBundle(android.os.Bundle bundle)
ControllerChangeHandlersaveToBundle in class ControllerChangeHandlerbundle - The Bundle into which data should be stored.public void restoreFromBundle(android.os.Bundle bundle)
ControllerChangeHandlerControllerChangeHandler.saveToBundle(Bundle bundle) method.restoreFromBundle in class ControllerChangeHandlerbundle - The bundle that has data to be restoredpublic 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 onViewAttachedToWindow(android.view.View v)
onViewAttachedToWindow in interface android.view.View.OnAttachStateChangeListenerpublic void onViewDetachedFromWindow(android.view.View v)
onViewDetachedFromWindow in interface android.view.View.OnAttachStateChangeListenerpublic ControllerChangeHandler copy()
ControllerChangeHandlercopy in class ControllerChangeHandlerpublic boolean isReusable()
ControllerChangeHandlerControllerChangeHandler.copy() method
prior to use.isReusable in class ControllerChangeHandler