java.lang.Object | |
↳ | android.support.v4.app.FragmentController |
Provides integration points with a FragmentManager
for a fragment host.
It is the responsibility of the host to take care of the Fragment's lifecycle.
The methods provided by FragmentController
are for that purpose.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Attaches the host to the FragmentManager for this controller.
| |||||||||||
Returns a
FragmentController .
| |||||||||||
Moves all Fragments managed by the controller's FragmentManager
into the activity created state.
| |||||||||||
Lets all Fragments managed by the controller's FragmentManager
know a configuration change occurred.
| |||||||||||
Sends a context item selection event to the Fragments managed by the
controller's FragmentManager.
| |||||||||||
Moves all Fragments managed by the controller's FragmentManager
into the create state.
| |||||||||||
Lets all Fragments managed by the controller's FragmentManager
know they should create an options menu.
| |||||||||||
Moves all Fragments managed by the controller's FragmentManager
into the destroy state.
| |||||||||||
Moves all Fragments managed by the controller's FragmentManager
into the destroy view state.
| |||||||||||
Lets all Fragments managed by the controller's FragmentManager
know the device is in a low memory condition.
| |||||||||||
Sends an option item selection event to the Fragments managed by the
controller's FragmentManager.
| |||||||||||
Lets all Fragments managed by the controller's FragmentManager
know their options menu has closed.
| |||||||||||
Moves all Fragments managed by the controller's FragmentManager
into the pause state.
| |||||||||||
Lets all Fragments managed by the controller's FragmentManager
know they should prepare their options menu for display.
| |||||||||||
Moves all Fragments managed by the controller's FragmentManager
into the resume state.
| |||||||||||
Moves all Fragments managed by the controller's FragmentManager
into the start state.
| |||||||||||
Moves all Fragments managed by the controller's FragmentManager
into the stop state.
| |||||||||||
Destroys the loaders and, if their state is not being retained, removes them.
| |||||||||||
Retains the state of each of the loaders.
| |||||||||||
Starts the loaders.
| |||||||||||
Stops the loaders, optionally retaining their state.
| |||||||||||
Dumps the current state of the loaders.
| |||||||||||
Execute any pending actions for the Fragments managed by the
controller's FragmentManager.
| |||||||||||
Returns the list of active fragments.
| |||||||||||
Returns the number of active fragments.
| |||||||||||
Returns a
FragmentManager for this controller.
| |||||||||||
Returns a
LoaderManager .
| |||||||||||
Marks the fragment state as unsaved.
| |||||||||||
Instantiates a Fragment's view.
| |||||||||||
Lets the loaders know the host is ready to receive notifications.
| |||||||||||
Restores the saved state for all Fragments.
| |||||||||||
Restores the saved state for all LoaderManagers.
| |||||||||||
Returns a list of LoaderManagers that have opted to retain their instance across
configuration changes.
| |||||||||||
Returns a list of Fragments that have opted to retain their instance across
configuration changes.
| |||||||||||
Saves the state for all Fragments.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Attaches the host to the FragmentManager for this controller. The host must be attached before the FragmentManager can be used to manage Fragments.
Returns a FragmentController
.
Moves all Fragments managed by the controller's FragmentManager into the activity created state.
Call when Fragments should be informed their host has been created.
Lets all Fragments managed by the controller's FragmentManager know a configuration change occurred.
Call when there is a configuration change.
Sends a context item selection event to the Fragments managed by the controller's FragmentManager. Once the event has been consumed, no additional handling will be performed.
Call immediately after an options menu item has been selected
true
if the context menu selection event was consumedMoves all Fragments managed by the controller's FragmentManager into the create state.
Call when Fragments should be created.
Lets all Fragments managed by the controller's FragmentManager know they should create an options menu.
Call when the Fragment should create an options menu.
true
if the options menu contains items to displayMoves all Fragments managed by the controller's FragmentManager into the destroy state.
Call when Fragments should be destroyed.
Moves all Fragments managed by the controller's FragmentManager into the destroy view state.
Call when the Fragment's views should be destroyed.
Lets all Fragments managed by the controller's FragmentManager know the device is in a low memory condition.
Call when the device is low on memory and Fragment's should trim their memory usage.
Sends an option item selection event to the Fragments managed by the controller's FragmentManager. Once the event has been consumed, no additional handling will be performed.
Call immediately after an options menu item has been selected
true
if the options menu selection event was consumedLets all Fragments managed by the controller's FragmentManager know their options menu has closed.
Call immediately after closing the Fragment's options menu.
Moves all Fragments managed by the controller's FragmentManager into the pause state.
Call when Fragments should be paused.
Lets all Fragments managed by the controller's FragmentManager know they should prepare their options menu for display.
Call immediately before displaying the Fragment's options menu.
true
if the options menu contains items to displayMoves all Fragments managed by the controller's FragmentManager into the resume state.
Call when Fragments should be resumed.
Moves all Fragments managed by the controller's FragmentManager into the start state.
Call when Fragments should be started.
Moves all Fragments managed by the controller's FragmentManager into the stop state.
Call when Fragments should be stopped.
Destroys the loaders and, if their state is not being retained, removes them.
Retains the state of each of the loaders.
Starts the loaders.
Stops the loaders, optionally retaining their state. This is useful for keeping the loader state across configuration changes.
retain | When true , the loaders aren't stopped, but, their instances
are retained in a started state
|
---|
Dumps the current state of the loaders.
Execute any pending actions for the Fragments managed by the controller's FragmentManager.
Call when queued actions can be performed [eg when the Fragment moves into a start or resume state].
true
if queued actions were performed
Returns the list of active fragments.
Returns the number of active fragments.
Marks the fragment state as unsaved. This allows for "state loss" detection.
Instantiates a Fragment's view.
parent | The parent that the created view will be placed in; note that this may be null. |
---|---|
name | Tag name to be inflated. |
context | The context the view is being created in. |
attrs | Inflation attributes as specified in XML file. |
Lets the loaders know the host is ready to receive notifications.
Restores the saved state for all Fragments. The given Fragment list are Fragment instances retained across configuration changes.
Restores the saved state for all LoaderManagers. The given LoaderManager list are LoaderManager instances retained across configuration changes.
Returns a list of LoaderManagers that have opted to retain their instance across configuration changes.
Returns a list of Fragments that have opted to retain their instance across configuration changes.