Syntax (SYNATX ):
<Applicationandroid: allowTaskReparenting = ["true" | "false"]
Android: backupAgent = "string"
Android: debuggable = ["true" | "false"]
Android: description = "string resource"
Android: enabled = ["true" | "false"]
Android: hasCode = ["true" | "false"]
Android: hardwareAccelerated = ["true" | "false"]
Android: icon = "drawable resource"
Android: killAfterRestore = ["true" | "false"]
Android: label = "string resource"
Android: logo = "drawable resource"
Android: manageSpaceActivity = "string"
Android: name = "string"
Android: permission = "string"
Android: persistent = ["true" | "false"]
Android: process = "string"
Android: restoreAnyVersion = ["true" | "false"]
Android: taskAffinity = "string"
Android: theme = "resource or theme"
Android: uiOptions = ["none" | "splitActionBarWhenNarrow"]>
...
</Application>
Included IN (contained in ):
<Manifest>
Can contain ):
<Activity>
<Activity-alias>
<Service>
<Cycler>
<Provider>
<Uses-library>
DESCRIPTION ):
This element is used for application declaration. It contains sub-elements declared by each application component and attributes that can affect all components. Many of these attributes (such as icon, label, permission, process, taskAffinity, and allowTaskReparenting) set the default values for the corresponding attributes in the component element. Other values set by the application (such as debuggable, enabled, description, and allowClearUserData) cannot be overwritten by the component attributes.
ATTRIBUTES (ATTRIBUTES ):
Android: allowTaskReparenting
When a task that is closely related to the current task is taken to the foreground, this attribute is used to specify whether the Activity defined in the application can be transferred from their current task to this kinship task. If it is set to true, It can be transferred. If it is set to false, the activities in the application must be kept in their tasks. The default value is false.
The <activity> element has its own allowTaskReparenting attribute, which can overwrite the settings in the <application> element.
Android: backupAgent
This attribute defines the name of the implementation class of the application backup proxy. This class is a subclass of the BackupAgent class. Its Attribute value should be the name of the complete Java class (for example, com. example. project. MyBackupAgent ). However, you can also use ". (For example ,. myBackupAgent), the system will append the package name specified in the <manifest> element "..
Android: debuggable
This attribute is used to specify whether an application can be debugged, even when running on a device in user mode. If it is set to true, debugging can be performed. Otherwise, debugging cannot be performed. The default value is false.
Android: description
This attribute is used to define user-readable text related to an application. It is longer and more detailed than the application tag. Its value must be set as a string resource reference. Unlike the label attribute, the label attribute can use a native string. This property has no default value.
Android: enabled
This attribute is used to specify whether the Android system can instantiate application components. If it is set to true, the component can be instantiated; otherwise, the component cannot be instantiated. If this attribute is set to true, each component uses its own enabled attribute settings to determine whether it can be instantiated. If this attribute is set to false, it overwrites the value specified by all its components and disables all components in the application.
The default value is true.
Android: hasCode
This attribute is used to set whether the application contains code. If it is set to true, the code is included. Otherwise, no code is included. When this attribute is set to false, the system will not try to load any application code when loading components. The default value is true.
If the application does not use any components other than the built-in component class of the application, this application will not have any code of its own, such as the Activity using the AliasActivity class, rarely happen.
Android: hardwareAccelerated
This attribute is used to enable hardware accelerated rendering for all Activity and View objects in the application. If it is set to true, It should be enabled. If it is set to false, it will not be enabled. The default value is false.
Since Android3.0, applications can use hardware-accelerated OpenGL Renderer to improve the performance of many common 2D graphic operations. When hardware accelerated rendering is started, most operations in Canvas, Paint, Xfermode, ColorFilter, Shader, and Camera are accelerated. This will make the animation and scrolling smoother and improve the overall response, even if the application does not explicitly use the framework's OpenGL class library.
Note that not all OpenGL 2D operations are accelerated. If the hardware accelerator Renderer is enabled, test the application to ensure that no error occurs when using the Renderer.
Android: icon
This attribute is used to set the entire icon of the application and the default icon of each application component. For <activity>, <activity-alias>, <service>, <service>, <author ER>, and <provider> elements, see their respective icon attributes.
When setting this attribute, you must reference A plotting resource that contains an image (for example, "@ drawable/icon "). No Default icon.
Android: killAfterRestore
This attribute is used to specify whether the problematic program should be terminated after the application settings are restored during the full system recovery operation. The single-package recovery operation will not cause the application to be shut down. The recovery operation of the entire system usually only happens once, that is, when the phone is set up for the first time. Third-party applications generally do not need this attribute.
The default value is true, which means that the application is terminated after data processing is completed during full system recovery.
Android: label
This attribute is used to set the user-readable label of the application as a whole and is also the default label of each application component. For <activity>, <activity-alias>, <service>, <Cycler>, and <provider> elements, see their label attributes.
When setting this attribute value, a string resource should be referenced. So that it can be localized like other strings in the user interface. However, for the convenience of application development, it can also be set with native strings.
Android: logo
This attribute is used to set a Logo for the entire application, and it is also the default Logo for all activities.
When setting this attribute, you must reference a resource that contains images (for example, "@ drawable/logo "). No Default Logo.
Android: manageSpaceActivity
This attribute defines the name of a complete Activity subclass. The system can load this name to the memory of the device occupied by the user management application. This Activity should also be declared using the <activity> element.
Android: name
This entire attribute uses the complete Java class name to define the implementation of an Application subclass for the Application. When an application process is started, this class is instantiated before any other application component is instantiated.
This subclass implementation is optional, and most applications do not need a subclass implementation. If you do not implement your own subclass, the Android system uses an instance of the basic Application class.
Android: permission
This attribute defines a permission. to interact with an application, the client must have this permission. This attribute is convenient for setting permissions for all application components. It can be overwritten by the permission attribute set by the independent component.
Android: persistent
This attribute allows you to set whether the application should be in running state at all times. If it is set to true, it will be maintained; otherwise, it will not be maintained. The default value is false. This attribute should not be set for common applications. The persistent run mode is only used for certain system-level applications.
Android: process
This attribute is used to define a process name. All components of the application should run in this process. Each component can overwrite the settings in the <application> element with its own process attribute settings.
By default, when the first component of an application needs to run, the Android system creates a process for the application. Then, all components in the application run in this process. The default process name matches the package name set in the <manifest> element.
By setting this attribute, you can share a process name with another application, the two applications can be installed in the same process to run the components-but only the two applications share a user ID with the same digital certificate.
If the process name starts with ":", a new and private process will be created for the application as needed. If the process name starts with a lower-case character, a global process is created with this name. This global process can be shared by other applications to reduce resource usage.
Android: restoreAnyVersion
Setting this attribute indicates that the application is preparing to recover any backup data set, even if the backup is newer than the version of the currently installed application on the device. This attribute is set to true. Even if the version does not match and the data compatibility prompt is generated, the backup management is allowed to restore the backup data. Therefore, use it with caution.
The default value of this attribute is false.
Android: taskAffinity
This attribute sets a kinship name for all the activities of the application, except those components that use their own taskAffinity attribute to set different kinship.
By default, all activities in the application share the same kinship, and the name of the kinship is the same as the package name set by the <manifest> element.
Android: theme
This attribute sets the default topic for all activities in the application. The attribute value must reference a style resource. The themes of each independent Activity are overwritten by their own theme attributes.
Android: uiOptions
This property sets additional options for the UI of the Activity. It must be a value in the following table:
Value |
Description |
None |
By default, no additional UI options are available. |
SplitActionBarWhenNarrow |
When the horizontal space is limited, a bar is added at the bottom of the screen to display the operation items in the ActionBar, for example, on a portrait handheld device. Instead of displaying a small number of operation items in the action bar at the top of the screen. It divides the operation column into the upper and lower parts. The top is used for navigation selection, and the bottom is used for project operations. This ensures that the available space is not only for the operation project, but also for the navigation and title at the top. Menu items cannot be separated into two columns. They must be displayed together. |
INTRODUCED version (introduced in ):
API Level 1
From FireOfStar's column