共用方式為


Application.IActivityLifecycleCallbacks.OnActivityPreCreated Method

Definition

Called as the first step of the Activity being created.

[Android.Runtime.Register("onActivityPreCreated", "(Landroid/app/Activity;Landroid/os/Bundle;)V", "GetOnActivityPreCreated_Landroid_app_Activity_Landroid_os_Bundle_Handler:Android.App.Application/IActivityLifecycleCallbacks, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=29)]
public virtual void OnActivityPreCreated (Android.App.Activity activity, Android.OS.Bundle? savedInstanceState);
[<Android.Runtime.Register("onActivityPreCreated", "(Landroid/app/Activity;Landroid/os/Bundle;)V", "GetOnActivityPreCreated_Landroid_app_Activity_Landroid_os_Bundle_Handler:Android.App.Application/IActivityLifecycleCallbacks, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=29)>]
abstract member OnActivityPreCreated : Android.App.Activity * Android.OS.Bundle -> unit
override this.OnActivityPreCreated : Android.App.Activity * Android.OS.Bundle -> unit

Parameters

activity
Activity
savedInstanceState
Bundle
Attributes

Remarks

Called as the first step of the Activity being created. This is always called before Activity#onCreate.

Java documentation for android.app.Application.ActivityLifecycleCallbacks.onActivityPreCreated(android.app.Activity, 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.

Applies to