Android 生命周期图解(Activity&Fragment)
2021-04-16 00:50:08 16 举报
Android 生命周期图解(Activity 与 Fragment 生命周期流程关系图)
作者其他创作
大纲/内容
Stopped
The activitycomes tothe foreground
onStop()
onStart()
Fragment isadded
Created
Fragment isactive
Activity isshut down
Paused
onDestoryView()
onResume()
The activity isno longer visible
Activity LifeTime
Fragment LifeTime
Other applicationsneed memory
User navigatesbackward orfragment is removed/repalced
onPause()
onCreate()
Started
Destroyed
The fragmentreturns tothe layout fromthe back stack
User navigatedback tothe Activity
Activity isrunning
onDetach()
Process iskilled
onDestory()
Fragment isdestoryed
onRestart()
Another activitycomes in front ofthe activity
onAttach()
Resumed
Activity Starts
onActivityCreated()
onCreateView()
0 条评论
回复 删除
下一页