语言

Instrumentation.OnCreate(Bundle) 方法

定义

在启动检测时调用,然后加载任何应用程序代码。

[Android.Runtime.Register("onCreate", "(Landroid/os/Bundle;)V", "GetOnCreate_Landroid_os_Bundle_Handler")]
public virtual void OnCreate(Android.OS.Bundle? arguments);
[<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

参数

arguments
Bundle

启动检测时提供的任何其他参数。

特性

注解

在启动检测时调用,然后加载任何应用程序代码。 通常,这将实现为仅调用 start() 以开始检测线程,然后在 onStart()中继续执行。 如果你不需要自己的线程,即编写检测是完全异步的(返回到事件循环以便应用程序可以运行),只需在此处开始检测,例如调用 Context.startActivity 以开始应用程序的相应第一个活动。

Android 参考。android.app.Instrumentation.onCreate

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于