次の方法で共有


FragmentManager.BeginTransaction Method

Definition

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

[Android.Runtime.Register("beginTransaction", "()Landroid/app/FragmentTransaction;", "GetBeginTransactionHandler")]
public abstract Android.App.FragmentTransaction? BeginTransaction ();
[<Android.Runtime.Register("beginTransaction", "()Landroid/app/FragmentTransaction;", "GetBeginTransactionHandler")>]
abstract member BeginTransaction : unit -> Android.App.FragmentTransaction

Returns

Attributes

Remarks

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

Note: A fragment transaction can only be created/committed prior to an activity saving its state. If you try to commit a transaction after Activity#onSaveInstanceState Activity.onSaveInstanceState() (and prior to a following Activity#onStart Activity.onStart or Activity#onResume Activity.onResume(), you will get an error. This is because the framework takes care of saving your current fragments in the state, and if changes are made after the state is saved then they will be lost.

Java documentation for android.app.FragmentManager.beginTransaction().

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.

Applies to