Life cycle of activity

Source: Internet
Author: User

Life cycle of activity
-----------------------------
Life cycle: the course of things from appearance to disappearance
Activity is one of the core components of Android, and all of Android's core components are maintained by the Android system, such as objects that create components (such as new Xxxactivity ()), and Invoke methods in the component. In an Android system, the activity's life cycle is manifested in the process of creating an activity object until the activity object is destroyed, in which the Android system automatically invokes a series of methods for that object.
The meaning of the learning life cycle can be expressed as: writing code in the right way
The life cycle process of activity is manifested by:
A) When activity is activated: OnCreate (), OnStart (), Onresume ()
b) When activity is obscured: onPause () show other interfaces, OnStop ()
c) When the blocked activity resumes display: Onrestart (), OnStart (), Onresume ()
D) When activity exits: OnPause (), OnStop (), OnDestroy ();

Life cycle of 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.