Android Boot Mode Launchmode

Source: Internet
Author: User

In Android, there are 4 activation modes for the activity and are described separately:

    1. Standard
    2. Singletop
    3. Singletask
    4. 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

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.