Language

FragmentTransaction Class

Definition

This class was deprecated in API level 28.

[Android.Runtime.Register("android/app/FragmentTransaction", DoNotGenerateAcw=true)]
public abstract class FragmentTransaction : Java.Lang.Object
[<Android.Runtime.Register("android/app/FragmentTransaction", DoNotGenerateAcw=true)>]
type FragmentTransaction = class
    inherit Object
Inheritance
FragmentTransaction
Attributes

Remarks

This class was deprecated in API level 28. Use the Support Library FragmentTransaction

API for performing a set of Fragment operations. Developer Guides For more information about using fragments, read the Fragments developer guide.

Android reference for android.app.FragmentTransaction.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Constructors

Name Description
FragmentTransaction()
FragmentTransaction(IntPtr, JniHandleOwnership)

Initializes a managed representation of an existing Java Native Interface object.

Properties

Name Description
Class

Returns the runtime class of this Object.

(Inherited from Object)
Handle

The handle to the underlying Android instance.

(Inherited from Object)
IsAddToBackStackAllowed

Returns true if this FragmentTransaction is allowed to be added to the back stack.

IsEmpty
JniIdentityHashCode

Gets the identity hash code assigned to this Java peer by the interop runtime.

(Inherited from Object)
JniManagedPeerState (Inherited from JavaObject)
JniPeerMembers

Provides JNI binding infrastructure for Android.App.FragmentTransaction.

PeerReference

Gets the JNI object reference for this Java peer.

(Inherited from Object)
ThresholdClass

Provides JNI binding infrastructure for Android.App.FragmentTransaction.

ThresholdType

Provides JNI binding infrastructure for Android.App.FragmentTransaction.

Methods

Name Description
Add(Fragment, String)

Calls add(int,Fragment,String) with a 0 containerViewId.

Add(Int32, Fragment, String)

Add a fragment to the activity state.

Add(Int32, Fragment)

Calls add(int,Fragment,String) with a null tag.

AddSharedElement(View, String)

Used with to map a View from a removed or hidden Fragment to a View from a shown or added Fragment.

AddToBackStack(String)

Add this transaction to the back stack.

Attach(Fragment)

Re-attach a fragment after it had previously been detached from the UI with detach(Fragment).

Clone()

Creates and returns a copy of this object.

(Inherited from Object)
Commit()

Schedules a commit of this transaction.

CommitAllowingStateLoss()

Like commit() but allows the commit to be executed after an activity's state is saved.

CommitNow()

Commits this transaction synchronously.

CommitNowAllowingStateLoss()

Like commitNow() but allows the commit to be executed after an activity's state is saved.

Construct(JniObjectReference, JniObjectReferenceOptions) (Inherited from JavaObject)
Detach(Fragment)

Detach the given fragment from the UI.

DisallowAddToBackStack()

Disallow calls to addToBackStack(String).

Dispose()

Releases the resources held by this Java peer.

(Inherited from Object)
Dispose(Boolean)

Releases the resources held by this Java peer.

(Inherited from Object)
DisposeUnlessReferenced() (Inherited from JavaObject)
Equals(Object) (Inherited from JavaObject)
Equals(Object)

Indicates whether some other object is "equal to" this one.

(Inherited from Object)
GetHashCode()

Returns a hash code value for the object.

(Inherited from Object)
Hide(Fragment)

Hides an existing fragment.

JavaFinalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

(Inherited from Object)
Notify()

Wakes up a single thread that is waiting on this object's monitor.

(Inherited from Object)
NotifyAll()

Wakes up all threads that are waiting on this object's monitor.

(Inherited from Object)
Remove(Fragment)

Remove an existing fragment.

Replace(Int32, Fragment, String)

Replace an existing fragment that was added to a container.

Replace(Int32, Fragment)

Calls replace(int,Fragment,String) with a null tag.

RunOnCommit(IRunnable)

Add a Runnable to this transaction that will be run after this transaction has been committed.

SetBreadCrumbShortTitle(ICharSequence)

Like setBreadCrumbShortTitle(int) but taking a raw string; this method is not recommended, as the string can not be changed later if the locale changes.

SetBreadCrumbShortTitle(Int32)

Set the short title to show as a bread crumb when this transaction is on the back stack, as used by FragmentBreadCrumbs.

SetBreadCrumbShortTitle(String)

Like setBreadCrumbShortTitle(int) but taking a raw string; this method is not recommended, as the string can not be changed later if the locale changes.

SetBreadCrumbTitle(ICharSequence)

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.

SetBreadCrumbTitle(Int32)

Set the full title to show as a bread crumb when this transaction is on the back stack, as used by FragmentBreadCrumbs.

SetBreadCrumbTitle(String)

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.

SetCustomAnimations(Int32, Int32, Int32, Int32)

Set specific animation resources to run for the fragments that are entering and exiting in this transaction.

SetCustomAnimations(Int32, Int32)

Set specific animation resources to run for the fragments that are entering and exiting in this transaction.

SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
SetPeerReference(JniObjectReference, JniObjectReferenceOptions) (Inherited from JavaObject)
SetPrimaryNavigationFragment(Fragment)

Set a currently active fragment in this FragmentManager as the primary navigation fragment.

SetReorderingAllowed(Boolean)

Sets whether or not to allow optimizing operations within and across transactions.

SetTransition(FragmentTransit)

Select a standard transition animation for this transaction.

SetTransitionStyle(Int32)

Set a custom style resource that will be used for resolving transit animations.

Show(Fragment)

Shows a previously hidden fragment.

ToArray<T>()

Creates a managed array from this Java array wrapper.

(Inherited from Object)
ToString()

Returns a string representation of the object.

(Inherited from Object)
UnregisterFromRuntime()

Unregisters this Java peer from the interop runtime.

(Inherited from Object)
Wait()

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>.

(Inherited from Object)
Wait(Int64, Int32)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)
Wait(Int64)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)

Explicit Interface Implementations

Name Description
IJavaPeerable.Disposed() (Inherited from JavaObject)
IJavaPeerable.Finalized() (Inherited from JavaObject)
IJavaPeerable.JniObjectReferenceControlBlock (Inherited from JavaObject)
IJavaPeerable.SetJniIdentityHashCode(Int32) (Inherited from JavaObject)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) (Inherited from JavaObject)
IJavaPeerable.SetPeerReference(JniObjectReference) (Inherited from JavaObject)

Extension Methods

Name Description
GetJniTypeName(IJavaPeerable)

Gets the JNI name of the type of the instance self.

JavaAs<TResult>(IJavaPeerable)

Try to coerce self to type TResult, checking that the coercion is valid on the Java side.

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
TryJavaCast<TResult>(IJavaPeerable, TResult)

Try to coerce self to type TResult, checking that the coercion is valid on the Java side.

Applies to