structure
Inheritance relationship
Public final class Manifest extends Object
Java.lang.Object
Android. Manifest
Inner class
- Class Manifest.permission Permissions
- Class Manifest.permission_group Permission Group
constructor Function
Public Manifest ()
Detailandroid:allowtaskreparenting
- Usage <application android:allowtaskreparenting= "True/false" ></application>
- Whether to allow activity to replace dependent tasks, such as switching from a short message task to a browser task.
- Used to mark whether an activity can move from a started task to a task with affinity (when the task enters the foreground)
- "True", can move
- "False", it must stay in the task at the start. The default value is "false"
In general, when activity starts, it is associated with the task that started it, and it runs out of its entire life cycle. When the current task is no longer displayed, you can use this feature to force the activity to move to a task that has affinity. The typical usage is to move the activity of one application into the main task of another application.
For example, if an e-mail contains a link to a Web page, clicking it launches an activity to display the page. This activity is defined by the browser application, but now it is part of the e-mail task. If it is re-hosted into the browser task, it can be seen when the next time browser enters the foreground, and when the e-mail task enters the foreground again, it will not be visible.
The affinity of actvity is defined by the taskaffinity attribute. The affinity of a task is determined by reading the affinity of the root activity. Thus, by definition, the root activity is always in the same affinity task. Because activity with the startup mode of "Singletask" and "singleinstance" can only be at the bottom of a task, the re-hosting can only be limited to "standard" and "Singletop" mode .
Android:alwaysretaintaskstate
- Usage <activity android:alwaysretaintaskstate= "True/false" ></activity>
- Marks whether the state of the task in which the activity resides is always maintained by the system
- "true", which means always
- "false", which means that in some cases the system is allowed to restore a task to its initialization state. The default value is "false".
- This feature is only meaningful for the root activity of a task, and is ignored for other activity.
In general, a particular situation, such as when the user re-selects the task from the main screen, cleans up the task (removing all activivity from the stack that is above the root activity). Typically, this is done when the user does not have access to the task for a period of time, such as 30 minutes.
However, when this feature is set to "true", users will always be able to return to the latest state of the task, no matter how they start.
For example, like the browser application, where there are many states (such as multiple open tabs), the user does not want to lose these states.
Android:cleartaskonlanunch
- Usage <activity android:cleartaskonlanunch= "True/false" ></activity>
- Flag whether to clear all activity from the task except root activity (whenever restarting from the main screen)
- "true", which means that always clears to its root Activity,
- Each time a user restarts the task, it goes into its root activity, regardless of what the task is doing at the end, regardless of whether the user left with back or home.
- "false" means no. The default value is "false".
- The Activity of a task may be cleared in some cases (refer to the Alwaysretaintaskstate feature), but not always.
- This feature is only meaningful for activity (root activity) that initiates a new task, and is ignored for other activity in the task.
Suppose someone launches activity P from the main screen and migrates from there to activity Q. Next the user presses home and returns to activity P. In general, the user may see activity Q because it is the last work content of P's task. However, if P sets this feature to "true", all Activity (in this case, Q) will be cleared when the user presses home and puts the task back into the foreground. Therefore, when you return to this task, the user sees only p.
If this attribute and allowtaskreparenting are set to "true", the activity that can be re-hosted will be moved to the shared affinity task, and the remaining activity will be discarded as described above.
android:configchanges
Whether the onconfigurationchanged () method such as "Locale|navigation|orientation" is called when the configuration list changes.
Example: When you press the Power key, onpause the process directly in the application. This is fine when the app is a vertical screen. However, when the app is horizontal, pressing the Power key will force the app back to the vertical screen and re-invoke the activity's oncreate. Many times this is not the expected result, so you will use Android:configchanges.
Set the android:configchanges= "Keyboardhidden|orientation" in the configuration file so that the activity's OnCreate () method is not recalled when the screen orientation changes. Instead, it calls onconfigurationchanged () and then weighs it down in the activity.
@Overridepublic void onconfigurationchanged (Configuration newconfig) { super.onconfigurationchanged (newconfig) ; if (newconfig.orientation==configuration.orientation_landscape) { //Landscape }else{ //Vertical }}
android:enabled
- Whether the activity can be instantiated
- Usage: <activity android:enabled= "true" ></activity>
android:excludefromrecents
- Whether it can be displayed in the recently opened Activity list
- Usage: <activity android:excludefromrecents= "true" ></activity>
android:exported
Whether activity is allowed to be called by other programs
Android:finishontasklaunch
Used to mark whether an activity instance that already exists when the user starts it again (selecting this task on the main screen) will be closed (end)
"true", which means it should be closed
"False" means no shutdown. The default value is "false".
If this feature and allowtaskreparenting are set to "true", this feature wins. The activity's affinity is ignored. This activity will not be re-hosted, but will be destroyed.
Android.icon
- Add to Application icon
- Usage: <application android:icon= "@drawable/xx_icon" ></application>
Android:label
The name of each title column is defined, but the priority is lower than settitle () in activity
Android:launchmode
Used to indicate how activity starts. There are four modes that work with the activity Flags (flag_activity_* variables) in the intent object to determine how the activity starts to handle intent. They are:
"Standard"
"Singletop"
"Singletask"
"SingleInstance"
The default mode is "standard".
"Standard" and "Singletop" are the first group, "Singletask" and "SingleInstance" are the second group.
The first group can be instantiated many times. These instances can belong to any task and can be anywhere in the activity stack. Typically, they go into a task that calls StartActivity () (unless the intent object contains a Flag_activity_new_task flag, in which case a different task--reference taskaffinity attribute is selected).
Taskaffinity Details Visible http://blog.csdn.net/zhaoyazhi2129/article/details/28290293
android:multiprocess
Allow multi-process
Android:name
The class name of the activity, which must be specified
android:onhistory
Whether you need to remove this activity when the user switches to another screen. This attribute is introduced in API level 3.
android:permission
http://blog.csdn.net/zhaoyazhi2129/article/details/8998575
android:process
The name of the process in which the activity is run, and all program components run in the application's default process, which is the same name as the application's package name.
The element process property in <application> can set a new default value for all components. But any component can override this default value, allowing you to put your program in a multi-process run. If this property is assigned the name begins with: When the activity is running, a new process dedicated to the program will be created. If the process name starts with a lowercase letter, the activity will run in the global process and be provided by its permission.
android:screenorientation
The mode of activity display,
"Unspecified" default value "Landscape" landscape mode, the width is larger than the height of the "portrait" portrait mode, height than the width of the larger. "User" users ' settings "behind" "Sensor" "Nosensor"
android:statenotneeded
Whether the activity is destroyed and successfully restarted does not save the state
android:taskaffinity
The activity's kinship, by default, has the same relationship as the activity under an application
Android:theme
activity's style theme, if not set, the activity's theme style belongs to the application, see the <application> element's Theme property
Android:windowsoftinputmode
Interactive mode of activity main window and soft keyboard, since API Level 3 was introduced
Android manifest.xml Options