Sdílet prostřednictvím


Activity.OnRestart Method

Definition

Called after #onStop when the current activity is being re-displayed to the user (the user has navigated back to it).

[Android.Runtime.Register("onRestart", "()V", "GetOnRestartHandler")]
protected virtual void OnRestart ();
[<Android.Runtime.Register("onRestart", "()V", "GetOnRestartHandler")>]
abstract member OnRestart : unit -> unit
override this.OnRestart : unit -> unit
Attributes

Remarks

Called after #onStop when the current activity is being re-displayed to the user (the user has navigated back to it). It will be followed by #onStart and then #onResume.

For activities that are using raw Cursor objects (instead of creating them through #managedQuery(android.net.Uri , String[], String, String[], String), this is usually the place where the cursor should be requeried (because you had deactivated it in #onStop.

<em>Derived classes must call through to the super class's implementation of this method. If they do not, an exception will be thrown.</em>

Java documentation for android.app.Activity.onRestart().

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