public abstract class ControllerChangeHandler
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
ControllerChangeHandler.ControllerChangeCompletedListener
A simplified listener for being notified when the change is complete.
|
static interface |
ControllerChangeHandler.ControllerChangeListener
A listener interface useful for allowing external classes to be notified of change events.
|
| Constructor and Description |
|---|
ControllerChangeHandler() |
| 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.
|
static ControllerChangeHandler |
fromBundle(android.os.Bundle bundle) |
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.
|
abstract 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
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.
|
void |
setForceRemoveViewOnPush(boolean force) |
public abstract void performChange(android.view.ViewGroup container,
android.view.View from,
android.view.View to,
boolean isPush,
ControllerChangeHandler.ControllerChangeCompletedListener changeListener)
container - 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 void saveToBundle(android.os.Bundle bundle)
bundle - The Bundle into which data should be stored.public void restoreFromBundle(android.os.Bundle bundle)
saveToBundle(Bundle bundle) method.bundle - The bundle that has data to be restoredpublic void onAbortPush(ControllerChangeHandler newHandler, Controller newTop)
newHandler - 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()
public ControllerChangeHandler copy()
public boolean isReusable()
copy() method
prior to use.public static ControllerChangeHandler fromBundle(android.os.Bundle bundle)
public boolean removesFromViewOnPush()
public void setForceRemoveViewOnPush(boolean force)