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