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).

C#
[Android.Runtime.Register("onRestart", "()V", "GetOnRestartHandler")]
protected virtual void OnRestart ();
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

Product Versions
.NET for Android .NET for Android API 34, .NET for Android API 35

See also