FragmentController

public class 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.

Summary

Public methods

@NonNull void

Attaches the host to the FragmentManager for this controller.

static @NonNull FragmentController

Returns a FragmentController.

@NonNull void

Moves all Fragments managed by the controller's FragmentManager into the activity created state.

@NonNull void

Lets all Fragments managed by the controller's FragmentManager know a configuration change occurred.

@NonNull boolean

Sends a context item selection event to the Fragments managed by the controller's FragmentManager.

@NonNull void

Moves all Fragments managed by the controller's FragmentManager into the create state.

@NonNull boolean
dispatchCreateOptionsMenu(
    @NonNull Menu menu,
    @NonNull MenuInflater inflater
)

Lets all Fragments managed by the controller's FragmentManager know they should create an options menu.

@NonNull void

Moves Fragments managed by the controller's FragmentManager into the destroy state.

@NonNull void

Moves all Fragments managed by the controller's FragmentManager into the destroy view state.

@NonNull void

Lets all Fragments managed by the controller's FragmentManager know the device is in a low memory condition.

@NonNull void
dispatchMultiWindowModeChanged(@NonNull boolean isInMultiWindowMode)

Lets all Fragments managed by the controller's FragmentManager know the multi-window mode of the activity changed.

@NonNull boolean

Sends an option item selection event to the Fragments managed by the controller's FragmentManager.

@NonNull void

Lets all Fragments managed by the controller's FragmentManager know their options menu has closed.

@NonNull void

Moves all Fragments managed by the controller's FragmentManager into the pause state.

@NonNull void
dispatchPictureInPictureModeChanged(
    @NonNull boolean isInPictureInPictureMode
)

Lets all Fragments managed by the controller's FragmentManager know the picture-in-picture mode of the activity changed.

@NonNull boolean

Lets all Fragments managed by the controller's FragmentManager know they should prepare their options menu for display.

@NonNull void

This method is deprecated.

This functionality has been rolled into dispatchStop.

@NonNull void

Moves all Fragments managed by the controller's FragmentManager into the resume state.

@NonNull void

Moves all Fragments managed by the controller's FragmentManager into the start state.

@NonNull void

Moves all Fragments managed by the controller's FragmentManager into the stop state.

@NonNull void

This method is deprecated.

Loaders are managed separately from FragmentController

@NonNull void

This method is deprecated.

Loaders are managed separately from FragmentController

@NonNull void

This method is deprecated.

Loaders are managed separately from FragmentController

@NonNull void
doLoaderStop(@NonNull boolean retain)

This method is deprecated.

Loaders are managed separately from FragmentController

@NonNull void
dumpLoaders(
    @NonNull String prefix,
    @Nullable FileDescriptor fd,
    @NonNull PrintWriter writer,
    @Nullable String[] args
)

This method is deprecated.

Loaders are managed separately from FragmentController

@NonNull boolean

Execute any pending actions for the Fragments managed by the controller's FragmentManager.

@Nullable Fragment

Returns a fragment with the given identifier.

@NonNull List<@NonNull Fragment>

Returns the list of active fragments.

@NonNull int