FragmentTransaction

public abstract class FragmentTransaction


Static library support version of the framework's android.app.FragmentTransaction. 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 SDK documentation for a class overview.

Summary

Constants

static final int

Bit mask that is set for all enter transitions.

static final int

Bit mask that is set for all exit transitions.

static final int

Fragment is being removed from the stack

static final int

Fragment should simply fade in or out; that is, no strong navigation associated with it except that it is appearing or disappearing for some reason.

static final int

Fragment is being removed from the stack with Activity close transition.

static final int

Fragment is being added onto the stack with Activity open transition.

static final int

Fragment is being added onto the stack

static final int

No animation for transition.

static final int

Not set up for a transition.

Public constructors

This method is deprecated.

You should not instantiate a FragmentTransaction except via beginTransaction.

Public methods

final @NonNull FragmentTransaction
add(
    @NonNull Class<Fragment> fragmentClass,
    @Nullable Bundle args,
    @Nullable String tag
)

Calls add with a 0 containerViewId.

@NonNull FragmentTransaction
add(@NonNull Fragment fragment, @Nullable String tag)

Calls add with a 0 containerViewId.

final @NonNull FragmentTransaction
add(
    @IdRes int containerViewId,
    @NonNull Class<Fragment> fragmentClass,
    @Nullable Bundle args
)

Calls add with a null tag.

@NonNull FragmentTransaction