Startup mode for Android activity

Source: Internet
Author: User

Active startup mode: 1.standard 2.singleTop 3.singleTask 4.singleInstance------- can be passed to <activity> in Androidmanifest LABEL specifies the Android:launchmode property to select the startup mode

Standard (1) The default startup mode each time a new instance of the activity is created on the return stack there can be 3 identical activities, so press three times back to exit the return stack but a a aSingletop (2) If it is found that the stack top of the return stack is already the activity, it can be used directly and will not create a new instance return stack can be a B a not aSingletask (3) guarantees that there is only one instance of the stack, that is, only one stack in the back stack can have one stack.SingleInstance (4) solves the problem of shared instances regardless of which application is accessing the activity, share the same return stack a->b->c this point 3 times back is c->a->b-> exit the entire process: A-&gt ; B->c->a-b-> exit

Startup mode for Android activity

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.