共用方式為


LocalActivityManager.SaveInstanceState Method

Definition

Caution

deprecated

Retrieve the state of all activities known by the group.

[Android.Runtime.Register("saveInstanceState", "()Landroid/os/Bundle;", "GetSaveInstanceStateHandler")]
[System.Obsolete("deprecated")]
public virtual Android.OS.Bundle? SaveInstanceState ();
[<Android.Runtime.Register("saveInstanceState", "()Landroid/os/Bundle;", "GetSaveInstanceStateHandler")>]
[<System.Obsolete("deprecated")>]
abstract member SaveInstanceState : unit -> Android.OS.Bundle
override this.SaveInstanceState : unit -> Android.OS.Bundle

Returns

a Bundle holding the newly created state of all known activities

Attributes

Remarks

Retrieve the state of all activities known by the group. For activities that have previously run and are now stopped or finished, the last saved state is used. For the current running activity, its Activity#onSaveInstanceState is called to retrieve its current state.

Java documentation for android.app.LocalActivityManager.saveInstanceState().

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

See also