Activity生命周期

启动FirstActivity ->启动SecondActivity ->返回FirstActivity

启动FirstActivity
2020-11-06 15:23:10.079 19027-19027/? E/FirstActivity: onCreate

2020-11-06 15:23:10.151 19027-19027/? E/FirstActivity: onStart

2020-11-06 15:23:10.153 19027-19027/? E/FirstActivity: onResume

启动SecondActivity

2020-11-06 15:23:40.954 19027-19027/? E/FirstActivity: onPause

2020-11-06 15:23:40.985 19027-19027/? E/SecondActivity: onCreate

2020-11-06 15:23:40.989 19027-19027/? E/SecondActivity: onStart

2020-11-06 15:23:40.990 19027-19027/? E/SecondActivity: onResume

2020-11-06 15:23:41.564 19027-19027/? E/FirstActivity: onStop

返回FirstActivity(onActivityResult方法在SecondActivity: onPause后,FirstActivity onRestart前调用)

2020-11-06 15:24:12.263 19027-19027/? E/SecondActivity: onPause

2020-11-06 15:24:12.273 19027-19027/? E/FirstActivity: onRestart

2020-11-06 15:24:12.273 19027-19027/? E/FirstActivity: onStart

2020-11-06 15:24:12.274 19027-19027/? E/FirstActivity: onResume

2020-11-06 15:24:12.816 19027-19027/? E/SecondActivity: onStop

2020-11-06 15:24:12.818 19027-19027/? E/SecondActivity: onDestroy

你可能感兴趣的:(Activity生命周期)