FragmentTransaction
abstract class FragmentTransaction
kotlin.Any | |
↳ | androidx.fragment.app.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 Int |
Bit mask that is set for all enter transitions. |
static Int |
Bit mask that is set for all exit transitions. |
static Int |
Fragment is being removed from the stack |
static 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 Int |
Fragment is being added onto the stack |
static Int |
No animation for transition. |
static Int |
Not set up for a transition. |
Public constructors | |
---|---|
<init>() |
Public methods | |
---|---|
FragmentTransaction |
Calls |
open FragmentTransaction |
Calls |
FragmentTransaction |
add(@IdRes containerViewId: Int, @NonNull fragmentClass: Class<out Fragment!>, @Nullable args: Bundle?) Calls |
open FragmentTransaction |
Calls |
FragmentTransaction |
add(@IdRes containerViewId: Int, @NonNull fragmentClass: Class<out Fragment!>, @Nullable args: Bundle?, @Nullable tag: String?) Add a fragment to the activity state. |
open FragmentTransaction |
Add a fragment to the activity state. |
open FragmentTransaction |
addSharedElement(@NonNull : View, @NonNull : String) Used with custom Transitions to map a View from a removed or hidden Fragment to a View from a shown or added Fragment. |
open FragmentTransaction |
addToBackStack(@Nullable name: String?) Add this transaction to the back stack. |
open FragmentTransaction |
Re-attach a fragment after it had previously been detached from the UI with |
abstract Int |
commit() Schedules a commit of this transaction. |
abstract Int |
Like |
abstract Unit |
Commits this transaction synchronously. |
abstract Unit |
Like |
open FragmentTransaction |
Detach the given fragment from the UI. |
open FragmentTransaction |
Disallow calls to |
open FragmentTransaction |
Hides an existing fragment. |
open Boolean |
Returns true if this FragmentTransaction is allowed to be added to the back stack. |
open Boolean |
isEmpty() |
open FragmentTransaction |
Remove an existing fragment. |
FragmentTransaction |
replace(@IdRes containerViewId: Int, @NonNull fragmentClass: Class<out Fragment!>, @Nullable args: Bundle?) Calls |
open FragmentTransaction |
Calls |
FragmentTransaction |
replace(@IdRes containerViewId: Int, @NonNull fragmentClass: Class<out Fragment!>, @Nullable args: Bundle?, @Nullable tag: String?) Replace an existing fragment that was added to a container. |
open FragmentTransaction |
Replace an existing fragment that was added to a container. |
open FragmentTransaction |
runOnCommit(@NonNull runnable: Runnable) Add a Runnable to this transaction that will be run after this transaction has been committed. |
open FragmentTransaction |
setAllowOptimization(allowOptimization: Boolean) |
open FragmentTransaction |
setBreadCrumbShortTitle(@StringRes res: Int) Set the short title to show as a bread crumb when this transaction is on the back stack. |
open FragmentTransaction |
setBreadCrumbShortTitle(@Nullable text: CharSequence?) Like |
open FragmentTransaction |
setBreadCrumbTitle(@StringRes res: Int) Set the full title to show as a bread crumb when this transaction is on the back stack. |
open FragmentTransaction |
setBreadCrumbTitle(@Nullable |