Activity.OnCreate Method

Definition

Overloads

OnCreate(Bundle, PersistableBundle)

Called when the activity is starting.

OnCreate(Bundle)

Called when the activity is starting.

OnCreate(Bundle, PersistableBundle)

Called when the activity is starting.

[Android.Runtime.Register("onCreate", "(Landroid/os/Bundle;Landroid/os/PersistableBundle;)V", "GetOnCreate_Landroid_os_Bundle_Landroid_os_PersistableBundle_Handler")]
public virtual void OnCreate (Android.OS.Bundle? savedInstanceState, Android.OS.PersistableBundle? persistentState);
[<Android.Runtime.Register("onCreate", "(Landroid/os/Bundle;Landroid/os/PersistableBundle;)V", "GetOnCreate_Landroid_os_Bundle_Landroid_os_PersistableBundle_Handler")>]
abstract member OnCreate : Android.OS.Bundle * Android.OS.PersistableBundle -> unit
override this.OnCreate : Android.OS.Bundle * Android.OS.PersistableBundle -> unit

Parameters

savedInstanceState
Bundle

If the activity is being re-initialized after previously being shut down then this Bundle contains the data it most recently supplied in #onSaveInstanceState. <b>Note: Otherwise it is null.</b>

persistentState
PersistableBundle

if the activity is being re-initialized after previously being shut down or powered off then this Bundle contains the data it most recently supplied to outPersistentState in OnSaveInstanceState(Bundle). Note: Otherwise it is null.

Attributes

Remarks

Java documentation for android.app.Activity.onCreate(android.os.Bundle).

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.

See also

Applies to

OnCreate(Bundle)

Called when the activity is starting.

[Android.Runtime.Register("onCreate", "(Landroid/os/Bundle;)V", "GetOnCreate_Landroid_os_Bundle_Handler")]
protected virtual void OnCreate (Android.OS.Bundle? savedInstanceState);
[<Android.Runtime.Register("onCreate", "(Landroid/os/Bundle;)V", "GetOnCreate_Landroid_os_Bundle_Handler")>]
abstract member OnCreate : Android.OS.Bundle -> unit
override this.OnCreate : Android.OS.Bundle -> unit

Parameters

savedInstanceState
Bundle

If the activity is being re-initialized after previously being shut down then this Bundle contains the data it most recently supplied in #onSaveInstanceState. <b>Note: Otherwise it is null.</b>

Attributes

Remarks

Java documentation for android.app.Activity.onCreate(android.os.Bundle).

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.

See also

Applies to