转载自百度知道地址: https://zhidao.baidu.com/question/367521754796980764.html
当Activity彻底运行起来之后回调onPostCreate方法,从官方解释可以看出 “Called when activity start-up is complete (after onStart() and onRestoreInstanceState(Bundle) have been called).”
通用生命周期流程如下:
正常启动
onCreate ->onStart
onPost
onCreate
onResume
onPostResume转向下一个
activity
onPause
onStop从下一个activity返回当前(按机器返回键)
onRestart
onStart
onResume
onPostResume转向上一个activity(按机器返回键)
onPause
onStop
onDestory
屏幕待机(黑掉)
onPause屏幕变亮
onResume
onPostResumeHome键退出
onPause
onStopHome键导航返回
onRestart
onStart
onResume
onPostResume旋转屏幕
onPause
onStop
onDestory
onCreate
onStart
onPostCreate
onResume
onPostResume