語言

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
屬性
實作

備註

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

建構函式

名稱 Description
ActivityAttribute()

建構並初始化一個新 ActivityAttribute 實例。

屬性

名稱 Description
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

活動的主視窗如何與包含螢幕軟鍵盤的視窗互動。

明確介面實作

名稱 Description
IJniNameProviderAttribute.Name

生成/manifest/application/activity一個元素。AndroidManifest.xml

適用於