Language

ActivityAttribute Class

Definition

Generates a /manifest/application/activity element within 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
Inheritance
ActivityAttribute
Attributes
Implements

Remarks

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.

Constructors

Name Description
ActivityAttribute()

Constructs and initializes a new ActivityAttribute instance.

Properties

Name Description
AllowEmbedded

Gets or sets whether the activity permits launch as another activity's embedded child.

AllowTaskReparenting

Whether or not the activity can move from the tasdk that started it to the task it has an affinity for.

AlwaysRetainTaskState

Whether or not the state of the task that the activity is in will always be maintained by the system.

AutoRemoveFromRecents

Gets or sets whether the task should leave Recents when its last activity finishes.

Banner

Gets or sets the activity's banner drawable resource for a Leanback launcher.

CanDisplayOnRemoteDevices

Gets or sets whether the activity declares support for display on remote devices.

ClearTaskOnLaunch

Whether or not all activities will be removed from the task, except for the root activity, whenever it is re-launched from the home screen.

ColorMode

Gets or sets the color mode requested for the activity's display.

ConfigurationChanges

The configuration changes that the activity will handle itself.

Description

Gets or sets descriptive text for the activity's manifest declaration.

DirectBootAware

Gets or sets whether the activity declares that it can run before the user enters unlock credentials.

DocumentLaunchMode

Gets or sets how activity launches participate in document tasks.

Enabled

Whether or not the activity can be instantiated by the system.

EnableOnBackInvokedCallback

Gets or sets the activity's choice of back-invoked callbacks instead of legacy back events.

EnableVrMode

Gets or sets the VR listener service component requested while the activity is visible.

ExcludeFromRecents

Whether or not the activity should be excluded from the list of recently launched activities.

Exported

Whether or not the activity can be launched by components of other applications.

FinishOnCloseSystemDialogs

Gets or sets whether a close-system-windows request should finish the activity.

FinishOnTaskLaunch

Whether or not an existing instance of the activity should be shut down whenever the user again launches its task.

HardwareAccelerated

Gets or sets whether the activity requests hardware-accelerated window rendering where available.

Icon

An icon representing the activity.

Immersive

Gets or sets the activity's immersive-mode declaration.

Label

A user-readable label for the activity.

LaunchMode

How the activity should be launched.

LayoutDirection
Obsolete.

Gets or sets an obsolete layout-direction value that has no corresponding activity manifest attribute.

LockTaskMode

Gets or sets the lock-task policy for tasks rooted at this activity.

Logo

Gets or sets the drawable resource used as the activity's logo.

MainLauncher

Whether or not the activity should be the main launcher for an application.

MaxAspectRatio

Gets or sets the maximum aspect ratio declared for the activity.

MaxRecents

Gets or sets the declared limit on recent tasks rooted at this activity.

MultiProcess

Whether an instance of the activity can be launched into the process of the component that started it.

Name

The name of the class that implements the activity.

NoHistory

Whether or not the activity should be removed from the activity stack and finished when the user navigates away.

ParentActivity

Gets or sets the managed type used to identify the activity's logical parent.

Permission

The name of a permission that clients must have to launch the activity.

PersistableMode

Gets or sets the activity's task-persistence policy across device reboots.

Process

The name of the process in which the activity should run.

RecreateOnConfigChanges

Gets or sets the configuration changes that request recreation of the activity.

RelinquishTaskIdentity

Gets or sets whether this task root yields the task's base intent to the next activity.

RequireContentUriPermissionFromCaller

Gets or sets the content-URI permissions required of callers launching the activity.

ResizeableActivity

Gets or sets the activity's declared support for resizable multi-window operation.

ResumeWhilePausing

Gets or sets whether the activity may resume before the previous activity finishes pausing.

RotationAnimation

Gets or sets the activity's preferred screen-rotation animation.

RoundIcon

Gets or sets the drawable resource used for the activity's round icon.

ScreenOrientation

The orientation of the activity's display on the device.

ShowForAllUsers

Gets or sets whether the activity requests visibility when another user is in the foreground.

ShowOnLockScreen
Obsolete.

Gets or sets the obsolete lock-screen and cross-user visibility declaration.

ShowWhenLocked

Gets or sets whether the resumed activity requests visibility above the lock screen.

SingleUser

Gets or sets the single-user value passed to the activity manifest writer.

StateNotNeeded

Whether or not the activity can be killed and successfully restarted without having saved its state.

SupportsPictureInPicture

Gets or sets whether the activity declares support for picture-in-picture mode.

TaskAffinity

The task that the activity has an affinity for.

Theme

A reference to a style resource defining an overall theme for the activity.

TurnScreenOn

Gets or sets whether the activity requests that the screen turn on when it becomes visible and resumed.

UiOptions

Gets or sets additional UI options for the activity.

VisibleToInstantApps

Gets or sets whether the activity declares visibility to instant apps.

WindowSoftInputMode

How the main window of the activity interacts with the window containing hte on-screen soft keyboard.

Explicit Interface Implementations

Name Description
IJniNameProviderAttribute.Name

Gets the attribute's name with a null value replaced by an empty string.

Applies to