Property summary in the activity configuration section of the android manifest File

Source: Internet
Author: User

<Activity Android: allowtaskreparenting = ["true" | "false"]

Android: alwaysretaintaskstate = ["true" | "false"]

Android: cleartaskonlaunch = ["true" | "false"]

Android: configchanges = ["MCC", "MNC", "locale", "touchscreen", "keyboard", "keyboardhidden", "navigation", "orientation ", "screenlayout", "fontscale", "uimode"]

Android: enabled = ["true" | "false"]

Android: excludefromrecents = ["true" | "false"]

Android: exported = ["true" | "false"]

Android: finishontasklaunch = ["true" | "false"]

Android: icon = "drawable resource"

Android: Label = "string resource"

Android: launchmode = ["multiple" | "singletop" | "sinletask" | "singleinstance"]

Android: Multiprocess = ["true" | "false"]

Android: Name = "string"

Android: nohistory = ["true" | "false"]

Android: Permission = "string"

Android: Process = "string"

Android: screenorientation = ["unspecified" | "user" | "behind" | "Landscape" | "portrait" | "sensor" | "nosensor"]

Android: statenotneeded = ["true" | "false"]

Android: taskaffinity = "string"

Android: theme = "resource or theme"

Android: windowsoftinputmode = ["stateunspecified", "stateunchanged", "statehidden", "statevisible", "statealwaysvisible", "adjustunspecified", "adjustresize ", "adjustpan"]>... </activity>

A relative is a task identifier, indicating the subordination between the activity and the task.

Android: allowtaskreparenting

Whether the target activity can be moved from the task that started it to the task that he defined and is to be displayed immediately. If it is false, it will stay in the task that started it.

Android: alwaysretaintaskstate

Whether to allow the system to retain the final state of the task. generally, after you press the Home key to start the application again, the system removes all the activities in the stack above the root activity; or when a task is not accessed for a period of time, other activities will be cleared by the system. this option only makes sense to the root activity. Other activities that contain this label will be ignored.

Android: cleartaskonlaunch

Whether to clear the task when restarting from the home interface. if it is true, each time the user starts the task, the user is taken to the root activity. no matter what they are doing, or whether it is left by pressing the back or home key. this is not the case if it is false.

For example, assume that the user starts P from home, then starts Q from P, the user clicks home, and then starts p. under normal circumstances, the user will see Q, because this is the last work the user has done in P. if P sets this flag to true, all activities above P will be cleared when the user clicks home. Therefore, when the user clicks home again, only p.

If this attribute and allowtaskreparenting are both true, all the activities that can be re-parented will be moved to the tasks in which they share their relatives, and the remaining activities will be discarded.

Android: finishontasklaunch

Whether to stop the activity when the user restarts the application from the home interface. if this attribute and allowtaskreparenting are both true, this attribute will kill that attribute. relatives of this activity will also be ignored. this activity will be destroyed.

Android: launchmode

Use Case Startup Mode Multi-instance Annotation

Common Mode "standard" Yes default value for most activities. The system will always create a new instance

"Singletop" conditionally if an instance already exists on the top of the stack of the target task, it will be reused. Otherwise, a new instance will be created. You can capture it by rewriting onnewintent ().

Special startup Method

(Not recommended for general applications) "singletask" No if the target activity does not exist, it is created and placed at the bottom of the target task stack, and then started;

If the target activity already exists, it is started and its onnewintent () method is executed.

"Singleinstance" No is the same as "singletask", but this activity will exclusively occupy a task

Android: allowtaskreparenting

Whether to allow the activity to change the subordinate task, such as switching from a short message task to a browser task.
Bytes --------------------------------------------------------------------------------------
Android: alwaysretaintaskstate

Whether to keep the status unchanged, such as switching back to home and then opening the activity again.
Bytes --------------------------------------------------------------------------------------
Android: cleartaskonlanunch

For example, if p is activity, Q is activity triggered by P, and then return home, start p again, and check whether Q is displayed.
Bytes --------------------------------------------------------------------------------------
Android: configchanges

When the configuration list is modified, whether to call the onconfigurationchanged () method, for example, "locale | navigation | orientation ".
Bytes --------------------------------------------------------------------------------------

Android: Enabled

Can an activity be instantiated,
Bytes --------------------------------------------------------------------------------------

Android: excludefromrecents

Whether it can be displayed in the list of recently opened activities
Bytes --------------------------------------------------------------------------------------
Android: exported

Whether activity can be called by other programs
Bytes --------------------------------------------------------------------------------------
Android: finishontasklaunch

Whether to disable an opened activity. When the user restarts the task
Bytes --------------------------------------------------------------------------------------
Android. icon
Bytes --------------------------------------------------------------------------------------
Android: Label
Bytes --------------------------------------------------------------------------------------
Android: launchmode

Activity startup mode, "standard" "singletop" "singletask" "singleinstance". The first two are a group, and the last two are a group.
Bytes --------------------------------------------------------------------------------------

Android: Multiprocess
Allow multiple processes
Bytes --------------------------------------------------------------------------------------
Android: Name

Activity Class Name, which must be specified

Bytes --------------------------------------------------------------------------------------
Android: onhistory
Whether to remove this activity when the user switches to another screen. This attribute is introduced in API Level 3.
Bytes --------------------------------------------------------------------------------------

Android: Permission
Bytes --------------------------------------------------------------------------------------
Android: Process
The process name of an activity. All program components run in the default process of the application. The process name is consistent with the package name of the application. The element process attribute in <Application> can set a new default value for all components. However, any component can overwrite this default value, allowing you to run your program in multiple processes. If the assigned name starts with ":", a new process dedicated to this program will be created when the activity is running. If the process name starts with a lowercase letter, the activity runs in a global process and is provided by its license.
Bytes --------------------------------------------------------------------------------------

Android: screenorientation

Activity display mode. "unspecified" Default Value: "Landscape" Landscape Painting mode. The width is greater than the height. The Portrait mode is greater than the width. "User" user's settings "behind" "sensor" "nosensor"

Bytes --------------------------------------------------------------------------------------

Android: statenotneeded

Whether the activity is destroyed or restarted successfully is not saved

Bytes --------------------------------------------------------------------------------------

Android: taskaffinity

The kinship of the activity. By default, the activity in the same application has the same relationship.

Bytes --------------------------------------------------------------------------------------

Android: Theme

If no theme is set, the theme style of the activity belongs to the application. For more information, see the theme attribute of the <Application> element.
Bytes --------------------------------------------------------------------------------------

Android: windowsoftinputmode

The interaction mode between the main activity window and the soft keyboard. Since API Level 3 is introduced, you can set the actual mode of the keyboard, which can be set in the configuration file or in the code, see android to solve the problem that the input method blocks the input box.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.