4 states of activity in Android

Source: Internet
Author: User

Four states of activity in Android:


1)active/runing: After a new Activity is launched into the stack, it is at the top of the screen, at the topmost end of the stack, where it is visible and can interact with the user's activation state.
2)Paused: State when activity is overwritten by another transparent or Dialog-style activity. At this point it remains connected to the window manager and the system continues to maintain its internal state, so it is still visible, but it has lost focus and cannot interact with the user.
3)stoped : In stoped state when activity is overwritten by another activity and loses focus is not visible.
4)killed : The Activity is in killed state when the system kills the recycle or is not started.

protected void OnStart () The method is called after the OnCreate () method , or is called when the Activity transitions from the Stop state to the active state, and is typically performed  OnStart () executes Onresume ().
protected void Onresume () is called when the Activity transitions from the Pause state to the active state.

4 states of activity in Android

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.