Use of Android development This.finish ()

Source: Internet
Author: User

It should be finished after an activity has been exhausted, but it was not too much of a problem to be aware of the development in the school itself, as activity whether or not the effect of the function did not seem so obvious (this is the view of reading), Therefore, there was no careful consideration of the problem of proper finish for the activity.

Recently encountered this problem in the company's project, so summed up a bit.

Let's say we have three activity, called A, B, C, respectively.

First case:
We first jump from A to B and then jump to C, after each jump completes the current activity, after the arrival of C, if we click the Back button, then we can only go back to B and then back to a.

Second case:
We go from a to B and then jump to C, jump from B to c after we finish off B, then to C, if we click the Back button, then we will go directly to a.

Summarize:
The finished activity can only be reached through the intent jump again, not through the back button, because the activity has been destroyed after finish.

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced. If there is a wrong place, I would appreciate it if I could criticize it.

Use of Android development This.finish ()

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.