FragmentManager

public abstract class FragmentManager implements FragmentResultOwner


Static library support version of the framework's android.app.FragmentManager. Used to write apps that run on platforms prior to Android 3.0. When running on Android 3.0 or above, this implementation is still used; it does not try to switch to the framework's implementation. See the framework FragmentManager documentation for a class overview.

Your activity must derive from FragmentActivity to use this. From such an activity, you can acquire the FragmentManager by calling getSupportFragmentManager.

Summary

Nested types

FragmentManager.BackStackEntry

Representation of an entry on the fragment back stack, as created with FragmentTransaction.addToBackStack().

FragmentManager.FragmentLifecycleCallbacks

Callback interface for listening to fragment state changes that happen within a given FragmentManager.

FragmentManager.OnBackStackChangedListener

Interface to watch for changes to the back stack.

Constants

static final int

Flag for popBackStack and popBackStack: If set, and the name or ID of a back stack entry has been supplied, then all matching entries will be consumed until one that doesn't match is found or the bottom of the stack is reached.

Public constructors

Public methods

void

Add a FragmentOnAttachListener that should receive a call to onAttachFragment when a new Fragment is attached to this FragmentManager.

void

Add a new listener for changes to the fragment back stack.

@NonNull FragmentTransaction

Start a series of edit operations on the Fragments associated with this FragmentManager.

void

Clears the back stack previously saved via saveBackStack.

final @Override void

Clears the stored result for the given requestKey.

final @Override void

Clears the stored FragmentResultListener for the given requestKey.

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

Print the FragmentManager's state into the given stream.

static void
<