Java android.app FragmentTransaction fields, constructors, methods, implement or subclass

Example usage for Java android.app FragmentTransaction fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for android.app FragmentTransaction.

The text is from its open source code.

Field

intTRANSIT_ENTER_MASK
Bit mask that is set for all enter transitions.
intTRANSIT_NONE
No animation for transition.
intTRANSIT_FRAGMENT_OPEN
Fragment is being added onto the stack
intTRANSIT_FRAGMENT_CLOSE
Fragment is being removed from the stack
intTRANSIT_FRAGMENT_FADE
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.

Method

FragmentTransactionadd(Fragment fragment, String tag)
Calls #add(int,Fragment,String) with a 0 containerViewId.
FragmentTransactionadd(@IdRes int containerViewId, Fragment fragment)
Calls #add(int,Fragment,String) with a null tag.
FragmentTransactionadd(@IdRes int containerViewId, Fragment fragment, String tag)
Add a fragment to the activity state.
FragmentTransactionaddToBackStack(@Nullable String name)
Add this transaction to the back stack.
FragmentTransactionattach(Fragment fragment)
Re-attach a fragment after it had previously been detached from the UI with #detach(Fragment) .
intcommit()
Schedules a commit of this transaction.
intcommitAllowingStateLoss()
Like #commit but allows the commit to be executed after an activity's state is saved.
FragmentTransactiondetach(Fragment fragment)
Detach the given fragment from the UI.
FragmentTransactiondisallowAddToBackStack()
Disallow calls to #addToBackStack(String) .
FragmentTransactionhide(Fragment fragment)
Hides an existing fragment.
booleanisAddToBackStackAllowed()
Returns true if this FragmentTransaction is allowed to be added to the back stack.
booleanisEmpty()
FragmentTransactionremove(Fragment fragment)
Remove an existing fragment.
FragmentTransactionreplace(@IdRes int containerViewId, Fragment fragment)
Calls #replace(int,Fragment,String) with a null tag.
FragmentTransactionreplace(@IdRes int containerViewId, Fragment fragment, String tag)
Replace an existing fragment that was added to a container.
FragmentTransactionsetBreadCrumbTitle(@StringRes int res)
Set the full title to show as a bread crumb when this transaction is on the back stack, as used by FragmentBreadCrumbs .
FragmentTransactionsetBreadCrumbTitle(CharSequence text)
Like #setBreadCrumbTitle(int) but taking a raw string; this method is not recommended, as the string can not be changed later if the locale changes.
FragmentTransactionsetCustomAnimations(@AnimatorRes int enter, @AnimatorRes int exit, @AnimatorRes int popEnter, @AnimatorRes int popExit)
Set specific animation resources to run for the fragments that are entering and exiting in this transaction.
FragmentTransactionsetCustomAnimations(@AnimatorRes int enter, @AnimatorRes int exit)
Set specific animation resources to run for the fragments that are entering and exiting in this transaction.
FragmentTransactionsetTransition(@Transit int transit)
Select a standard transition animation for this transaction.
FragmentTransactionshow(Fragment fragment)
Shows a previously hidden fragment.