通过Android Studio创建包含两个Fragment的Activity:
QuestListFragment、QuestInputFragment
调用的过程如下:
打开APP
QuestListFragment﹕ onAttach
QuestListFragment﹕ onCreate
QuestListFragment﹕ onCreateView
QuestListFragment﹕ onViewCreated
QuestListFragment﹕ onStart
QuestListFragment﹕ onResume
QuestInputFragment﹕ onAttach
QuestInputFragment﹕ onCreate
QuestInputFragment﹕ onCreateView
QuestInputFragment﹕ onViewCreated
QuestInputFragment﹕ onActivityCreated
QuestInputFragment﹕ onStart
QuestInputFragment﹕ onResume
旋转屏幕
QuestListFragment﹕ onPause
QuestInputFragment﹕ onPause
QuestListFragment﹕ onSaveInstanceState
QuestInputFragment﹕ onSaveInstanceState
QuestListFragment﹕ onStop
QuestInputFragment﹕ onStop
QuestListFragment﹕ onDestroyView
QuestListFragment﹕ onDestroy
QuestListFragment﹕ onDetach
QuestInputFragment﹕ onDestroyView
QuestInputFragment﹕ onDestroy
QuestInputFragment﹕ onDetach
QuestListFragment﹕ onAttach
QuestListFragment﹕ onCreate
QuestInputFragment﹕ onAttach
QuestInputFragment﹕ onCreate
QuestListFragment﹕ onCreateView
QuestListFragment﹕ onViewCreated
QuestInputFragment﹕ onCreateView
QuestInputFragment﹕ onViewCreated
QuestInputFragment﹕ onActivityCreated
QuestListFragment﹕ onStart
QuestInputFragment﹕ onStart
QuestListFragment﹕ onResume
QuestInputFragment﹕ onResume
关闭屏幕
QuestListFragment﹕ onPause
QuestInputFragment﹕ onPause
QuestListFragment﹕ onSaveInstanceState
QuestInputFragment﹕ onSaveInstanceState
QuestListFragment﹕ onStop
QuestInputFragment﹕ onStop
点亮屏幕
QuestListFragment﹕ onStart
QuestInputFragment﹕ onStart
QuestListFragment﹕ onResume
QuestInputFragment﹕ onResume
HOME键
QuestListFragment﹕ onPause
QuestInputFragment﹕ onPause
QuestListFragment﹕ onSaveInstanceState
QuestInputFragment﹕ onSaveInstanceState
QuestListFragment﹕ onStop
QuestInputFragment﹕ onStop