What is the difference between onStart () and onResume () of Activity in android? onstartonresume

Source: Internet
Author: User

What is the difference between onStart () and onResume () of Activity in android? onstartonresume

First, you need to know the four statuses of the Activity:
After a new Active/Runing Activity is started into the stack, it is at the front end of the screen and at the top of the stack. At this time, it is visible and can interact with users.
Paused is the status when the Activity is overwritten by another transparent or Dialog style Activity. at this time, it is still connected to the window manager, and the system continues to maintain its internal status, so it is still visible, but it has lost the focus, so it cannot interact with users.
Stoped is in the Stoped state when the Activity is overwritten by another Activity and the focus is not visible.
The Killed Activity is Killed and recycled by the system or is in the Killed state when it is not started.
Protected void onStart () This method is called after the onCreate () method, or is called when the Activity is switched from the Stop state to the Active state. Generally, onStart () is executed () then run onResume ().
Protected void onResume () is called when the Activity changes from the Pause status to the Active status.

(To: http://zuoye.baidu.com/question/55f0bd4a896d832e62ce41971048fff3.html)

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.