Udostępnij za pośrednictwem


FragmentTransaction.CommitAllowingStateLoss Method

Definition

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

[Android.Runtime.Register("commitAllowingStateLoss", "()I", "GetCommitAllowingStateLossHandler")]
public abstract int CommitAllowingStateLoss ();
[<Android.Runtime.Register("commitAllowingStateLoss", "()I", "GetCommitAllowingStateLossHandler")>]
abstract member CommitAllowingStateLoss : unit -> int

Returns

Attributes

Remarks

Like #commit but allows the commit to be executed after an activity's state is saved. This is dangerous because the commit can be lost if the activity needs to later be restored from its state, so this should only be used for cases where it is okay for the UI state to change unexpectedly on the user.

Java documentation for android.app.FragmentTransaction.commitAllowingStateLoss().

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