Activity life cycle:
Open Activity:
onCreate =>onStart =>onResume
Then press the home key to return to the desktop:
onPause =>onStop
Enter the activity again:
onRestart=>onStart=>onResume
Could we have another complete
onCreate=>onStart =>onResume
=>onPause=>onStop
=>onRestart =>onStart=>onResume
Exit activity life cycle:
onPause=>onStop=>onDestory
Come complete:
activity start: onCreate => onStart => onResume
press the Home activity: onPause => onStop
return to activity: onReStart => onStart => onResume
exit activity: onPause => onStop => onDestory