The status of the activity is determined by the position of the activity stack, which is the advanced and acitivity of all the running.
When an activity is started, the state becomes active (activities) and is moved to the top of the stack;
Use the Back button to return to the activity just now, the foreground activity is closed, and the next activity on the stack moves to the top of the stack;
The activity consists of four states:
Activity state: Visible, the foreground acitivity with the focus;
Paused state: Visible, inactive activity without focus;
Stop state: An activity that is not visible;
Inactive state: Terminated activity;
Event handlers:
OnCreate () Initializes a acitivity and fills the UI;
Onrestoreinstancestate ()-Onrestart (), after the creation, restores the UI state, the activity instance state, restarts the acitivity;
OnStart (): The visible survival cycle of activity begins;
Onresume (): Resumption of activity by pause (suspended);
Onsaveinstancestate (): maintains an instance state of the activity;
OnPause (): Suspend the activity of the front desk and turn it into a suspended state;
OnStop (): Stops the activity, the back key, converts to the stop State;
OnDestroy (): Terminate activity and convert to inactive state;
See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/OS/extra/