In Android, there are 4 activation modes for the activity and are described separately:
- Standard
- Singletop
- Singletask
- SingleInstance
Androidmanifest.xml Configuring Android:launchmode Properties
1.standard:
The default startup mode.
Each time an instance is created and can be used within each task stack.
2.singleTop:
The jump behavior is handled according to the Singletop startup mode. When jumping, the system will first look for an activity instance in the stack structure, and if there is no new one, use it directly. If the system discovers that there is an activity instance, but not at the top of the stack, regenerate an instance.
Singletop Boot Mode This is the case, if you find that the corresponding activity instance is at the top of the stack, you can create only one instance over and over again (reuse does not generate new instances). Instead, create a new instance at the top of the stack.
3.singleTask:
If a corresponding acitivty instance is found, the activity instance on top of the activity instance exits the stack , making this acitivity instance the top of the stack object, before it is displayed to the screen.
4.singleInstance:
This clock startup mode is special because it enables a new stack structure, places the activity in the new stack structure, and guarantees that no other activity instances will enter.
There is only one separate task stack, and one task stack includes only one.
Cond.......
1. Where can these startup modes be used?
2. The text expression is more abstract, drawing demonstration good?
3. What is the secret behind the startup mode?
Android Boot Mode Launchmode