Android Note 3.4 Activity startup mode on Android

Source: Internet
Author: User

Course Background:
There are four startup modes in Android, each of which represents a use case, with in-depth knowledge of the four startup modes to be able to write the perfect program in the actual development work.

Core content:
1.Activity Standard start Mode
2.Activity singletop Boot Mode
3.Activity singletask Boot Mode
4.Activity singleinstance Boot Mode

Configure how each activity is started in Androidmanifest.xml:

1.Activity Standard start Mode

Standard, default startup mode, same task stack, always create new instances, first in and out.

All activity is in a stack, each activity can have multiple instances, for example: A,b,c,b,a,b,a ...

2.Activity singletop Boot Mode

There can only be one instance of the activity at the top, such as the sequential a,b,c of the

First, if you start C again, it will be completely unchanged.

Second, if re-start B, that is: a,b,c,b

3.Activity singletask Boot Mode

Only one of each activity can exist, such as the sequential a,b,c of a stack,

First, if you start a again, the c,b pops up. The remaining a (that is, any instance can not be repeated, will pop up the upper instance after the top)

Second, if you start C again, it will be completely unchanged.

4.Activity singleinstance Boot Mode

All instances have a single stack that is switched between each other.

Android Note 3.4 Activity startup mode on Android

Related Article

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.