Activity生命周期

2020-11-07  本文已影响0人  fsdffdaga

打开 MainActivity
I/hbh: MainActivity onCreate:
I/hbh: MainActivity onStart:
I/hbh: MainActivity onResume:

点击跳转到 EditTextActivity
I/hbh: MainActivity onPause:
I/hbh: EditTextActivity onCreate:
I/hbh: EditTextActivity onStart:
I/hbh: EditTextActivity onResume:
I/hbh: MainActivity onStop:

在 EditTextActivity 页面点击返回到 MainActivity
I/hbh: EditTextActivity onPause:
I/hbh: MainActivity onRestart:
I/hbh: MainActivity onStart:
I/hbh: MainActivity onResume:
I/hbh: EditTextActivity onStop:
I/hbh: EditTextActivity onDestroy:

灭屏
I/hbh: MainActivity onPause:
I/hbh: MainActivity onStop:

亮屏
I/hbh: MainActivity onRestart:
I/hbh: MainActivity onStart:
I/hbh: MainActivity onResume:

上一篇 下一篇

猜你喜欢

热点阅读