语言

ActivityAttribute 类

定义

在 . 中/manifest/application/activity生成元素AndroidManifest.xml

[System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=false, Inherited=false)]
[System.Serializable]
public sealed class ActivityAttribute : Attribute, Java.Interop.IJniNameProviderAttribute
[<System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=false, Inherited=false)>]
[<System.Serializable>]
type ActivityAttribute = class
    inherit Attribute
    interface IJniNameProviderAttribute
继承
ActivityAttribute
属性
实现

注解

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

构造函数

名称 说明
ActivityAttribute()

构造并初始化新 ActivityAttribute 实例。

属性

名称 说明
AllowEmbedded
AllowTaskReparenting

活动是否可以从启动该活动的 tasdk 移动到具有关联性的任务。

AlwaysRetainTaskState

活动进入的任务的状态是否始终由系统维护。

AutoRemoveFromRecents
Banner
CanDisplayOnRemoteDevices
ClearTaskOnLaunch

无论是否从任务中删除所有活动(根活动除外)只要从主屏幕重新启动它。

ColorMode
ConfigurationChanges

配置将更改活动将自行处理。

Description
DirectBootAware
DocumentLaunchMode
Enabled

是否可以由系统实例化活动。

EnableOnBackInvokedCallback
EnableVrMode
ExcludeFromRecents

是否应将活动从最近启动的活动列表中排除。

Exported

活动是否可以由其他应用程序的组件启动。

FinishOnCloseSystemDialogs
FinishOnTaskLaunch

每当用户再次启动活动任务时,是否应关闭活动的现有实例。

HardwareAccelerated
Icon

表示活动的图标。

Immersive
Label

活动的用户可读标签。

LaunchMode

应如何启动活动。

LayoutDirection
LockTaskMode
Logo
MainLauncher

活动是否应为应用程序的主要启动器。

MaxAspectRatio
MaxRecents
MultiProcess

活动实例是否可以启动到启动活动的组件进程中。

Name

实现活动的类的名称。

NoHistory

是否应从活动堆栈中删除活动,并在用户离开时完成。

ParentActivity
Permission

客户端必须必须启动活动的权限的名称。

PersistableMode
Process

活动应在其中运行的进程的名称。

RecreateOnConfigChanges
RelinquishTaskIdentity
RequireContentUriPermissionFromCaller
ResizeableActivity
ResumeWhilePausing
RotationAnimation
RoundIcon
ScreenOrientation

活动在设备上显示的方向。

ShowForAllUsers
ShowOnLockScreen
ShowWhenLocked
SingleUser
StateNotNeeded

活动是否可以终止并成功重启,而无需保存其状态。

SupportsPictureInPicture
TaskAffinity

活动关联的任务。

Theme

对为活动定义整体主题的样式资源的引用。

TurnScreenOn
UiOptions
VisibleToInstantApps
WindowSoftInputMode

活动的主窗口如何与包含屏幕软键盘的窗互。

显式接口实现

名称 说明
IJniNameProviderAttribute.Name

在 . 中/manifest/application/activity生成元素AndroidManifest.xml

适用于