FragmentController
open class FragmentController
kotlin.Any | |
↳ | androidx.fragment.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.
Summary
Public methods | |
---|---|
open Unit |
attachHost(@Nullable parent: Fragment?) Attaches the host to the FragmentManager for this controller. |
open static FragmentController |
createController(@NonNull callbacks: FragmentHostCallback<*>) Returns a |
open Unit |
Moves all Fragments managed by the controller's FragmentManager into the activity created state. |
open Unit |
dispatchConfigurationChanged(@NonNull newConfig: Configuration) Lets all Fragments managed by the controller's FragmentManager know a configuration change occurred. |
open Boolean |
dispatchContextItemSelected(@NonNull item: MenuItem) Sends a context item selection event to the Fragments managed by the controller's FragmentManager. |
open Unit |
Moves all Fragments managed by the controller's FragmentManager into the create state. |
open Boolean |
dispatchCreateOptionsMenu(@NonNull : Menu, @NonNull inflater: MenuInflater) Lets all Fragments managed by the controller's FragmentManager know they should create an options menu. |
open Unit |
Moves Fragments managed by the controller's FragmentManager into the destroy state. |
open Unit |
Moves all Fragments managed by the controller's FragmentManager into the destroy view state. |
open Unit |
Lets all Fragments managed by the controller's FragmentManager know the device is in a low memory condition. |
open Unit |
dispatchMultiWindowModeChanged(isInMultiWindowMode: Boolean) Lets all Fragments managed by the controller's FragmentManager know the multi-window mode of the activity changed. |
open Boolean |
dispatchOptionsItemSelected(@NonNull item: MenuItem) Sends an option item selection event to the Fragments managed by the controller's FragmentManager. |
open Unit |
dispatchOptionsMenuClosed(@NonNull : Menu) Lets all Fragments managed by the controller's FragmentManager know their options menu has closed. |
open Unit |
Moves all Fragments managed by the controller's FragmentManager into the pause state. |
open Unit |
dispatchPictureInPictureModeChanged(isInPictureInPictureMode: Boolean) Lets all Fragments managed by the controller's FragmentManager know the picture-in-picture mode of the activity changed. |
open Boolean |
dispatchPrepareOptionsMenu(@NonNull : Menu) Lets all Fragments managed by the controller's FragmentManager know they should prepare their options menu for display. |
open Unit | |
open Unit |
Moves all Fragments managed by the controller's FragmentManager into the resume state. |
open Unit |
Moves all Fragments managed by the controller's FragmentManager into the start state. |
open Unit |
Moves all Fragments managed by the controller's FragmentManager into the stop state. |
open Unit |
Destroys the loaders and, if their state is not being retained, removes them. |
open Unit |
Retains the state of each of the loaders. |
open Unit |
Starts the loaders. |
open Unit |
doLoaderStop(retain: Boolean) Stops the loaders, optionally retaining their state. |
open Unit |
dumpLoaders(@NonNull prefix: String, @Nullable fd: FileDescriptor?, @NonNull writer: PrintWriter, @Nullable args: Array<String!>?) Dumps the current state of the loaders. |
open Boolean |
Execute any pending actions for the Fragments managed by the controller's FragmentManager. |
open Fragment? |
findFragmentByWho(@NonNull who: String) Returns a fragment with the given identifier. |
open MutableList<Fragment!> |
getActiveFragments(actives: MutableList<Fragment!>!) Returns the list of active fragments. |
open Int |
Returns the number of active fragments. |
open FragmentManager |
Returns a |
open LoaderManager! |
Returns a |
open Unit |
Marks the fragment state as unsaved. |