LauncherApps.StartMainActivity 方法

定义

在指定的配置文件中启动 Main 活动。

[Android.Runtime.Register("startMainActivity", "(Landroid/content/ComponentName;Landroid/os/UserHandle;Landroid/graphics/Rect;Landroid/os/Bundle;)V", "GetStartMainActivity_Landroid_content_ComponentName_Landroid_os_UserHandle_Landroid_graphics_Rect_Landroid_os_Bundle_Handler")]
public virtual void StartMainActivity (Android.Content.ComponentName? component, Android.OS.UserHandle? user, Android.Graphics.Rect? sourceBounds, Android.OS.Bundle? opts);
[<Android.Runtime.Register("startMainActivity", "(Landroid/content/ComponentName;Landroid/os/UserHandle;Landroid/graphics/Rect;Landroid/os/Bundle;)V", "GetStartMainActivity_Landroid_content_ComponentName_Landroid_os_UserHandle_Landroid_graphics_Rect_Landroid_os_Bundle_Handler")>]
abstract member StartMainActivity : Android.Content.ComponentName * Android.OS.UserHandle * Android.Graphics.Rect * Android.OS.Bundle -> unit
override this.StartMainActivity : Android.Content.ComponentName * Android.OS.UserHandle * Android.Graphics.Rect * Android.OS.Bundle -> unit

参数

component
ComponentName

要启动的活动的 ComponentName

user
UserHandle

配置文件的 UserHandle

sourceBounds
Rect

包含已单击图标的源边界的 Rect

opts
Bundle

传递给 startActivity 的选项

属性

注解

在指定的配置文件中启动 Main 活动。

适用于 . 的 android.content.pm.LauncherApps.startMainActivity(android.content.ComponentName, android.os.UserHandle, android.graphics.Rect, android.os.Bundle)Java 文档

本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。

适用于