activity lifecycle
1. Start the activity: the system first calls Oncreate -onstart -onresume, Activity
2. Stop the activity: the activity is covered and the system will ask you to pause the current activity;
3. User return activity: the system first calls the application on view -onresume, and then enters the working state;
4. The user logs out of the current activity: the system first calls ONPAUSE -Onstop -RESOLUTION to end the current activity;
To refer to:
https://blog.csdn.net/hellofengyu/article/details/78001960