public class Bridge
extends java.lang.Object
| Constructor and Description |
|---|
Bridge() |
| Modifier and Type | Method and Description |
|---|---|
static void |
clear(java.lang.Object target)
Clears any data associated with the given target object that may be stored to disk.
|
static void |
clearAll(android.content.Context context)
Clears all data from disk and memory.
|
static void |
initialize(android.content.Context context,
SavedStateHandler savedStateHandler)
Initializes the framework used to save and restore data and route it to a location free from
TransactionTooLargeException. |
static void |
initialize(android.content.Context context,
SavedStateHandler savedStateHandler,
ViewSavedStateHandler viewSavedStateHandler)
Initializes the framework used to save and restore data and route it to a location free from
TransactionTooLargeException. |
static void |
restoreInstanceState(java.lang.Object target,
android.os.Bundle state)
Restores the state of the given target object based on tracking information stored in the
given
Bundle. |
static <T extends android.view.View> |
restoreInstanceState(T target,
android.os.Parcelable state)
Restores the state of the given
View based on tracking information stored in the
given Parcelable object. |
static void |
saveInstanceState(java.lang.Object target,
android.os.Bundle state)
Saves the state of the given target object to a location in memory and disk and stores
tracking information in given
Bundle. |
static <T extends android.view.View> |
saveInstanceState(T target,
android.os.Parcelable parentState)
Saves the state of the given
View to a location in memory and disk and stores
tracking information in the returned Parcelable object. |
public static void clear(java.lang.Object target)
Build.VERSION_CODES.ICE_CREAM_SANDWICH.
It is required to call initialize(Context, SavedStateHandler) before calling this
method.
public static void clearAll(android.content.Context context)
initialize(Context,
SavedStateHandler).public static void initialize(android.content.Context context,
SavedStateHandler savedStateHandler)
TransactionTooLargeException. The actual state saving and restoration
of each object will be performed by the provided SavedStateHandler. Note that in
order to save the state of View objects, you must instead use
initialize(Context, SavedStateHandler, ViewSavedStateHandler).context - an application Context necessary for saving state to disksavedStateHandler - used to do the actual state saving and restoring for a given objectpublic static void initialize(android.content.Context context,
SavedStateHandler savedStateHandler,
ViewSavedStateHandler viewSavedStateHandler)
TransactionTooLargeException. The actual state saving and restoration
of each object will be performed by the provided SavedStateHandler for
non-View objects and ViewSavedStateHandler for View objects
(when set).context - an application Context necessary for saving state to disksavedStateHandler - used to do the actual state saving and restoring for a given
objectviewSavedStateHandler - used to do the actual state saving and restoring for a given
Viewpublic static void restoreInstanceState(java.lang.Object target,
android.os.Bundle state)
Bundle. The actual saved data will be retrieved from a location in memory or
stored on disk.
It is required to call initialize(Context, SavedStateHandler) before calling this
method.
public static <T extends android.view.View> android.os.Parcelable restoreInstanceState(T target,
android.os.Parcelable state)
View based on tracking information stored in the
given Parcelable object. The actual saved data will be retrieved from a location in
memory or stored on disk.
It is required to call initialize(Context, SavedStateHandler, ViewSavedStateHandler)
before calling this method.
View. This is intended to be passed to the
super method call inside a View's onRestoreInstanceState.public static void saveInstanceState(java.lang.Object target,
android.os.Bundle state)
Bundle.
It is required to call initialize(Context, SavedStateHandler) before calling this
method.
public static <T extends android.view.View> android.os.Parcelable saveInstanceState(T target,
android.os.Parcelable parentState)
View to a location in memory and disk and stores
tracking information in the returned Parcelable object.
It is required to call initialize(Context, SavedStateHandler) before calling this
method.
View, to be returned in its
onSaveInstanceState method.