HomeFragment是第一个默认打开的Fragment,GalleryFragment是跳转的Fragment,log有先后顺序
打开app
HomeFragment-- onAttach
HomeFragment-- onCreate
HomeFragment-- onCreateView
HomeFragment-- onViewCreated
HomeFragment-- onViewStateRestored
HomeFragment-- onStart
HomeFragment-- onResume
跳转到GalleryFragment
HomeFragment-- open nav_gallery
GalleryFragment-- onAttach
GalleryFragment-- onCreate
GalleryFragment-- onCreateView
GalleryFragment-- onViewCreated
GalleryFragment-- onViewStateRestored
GalleryFragment-- onStart
GalleryFragment-- onResume
HomeFragment-- onPause
HomeFragment-- onStop
HomeFragment-- onDestroyView
返回HomeFragment
GalleryFragment-- back
HomeFragment-- onCreateView
HomeFragment-- onViewCreated
HomeFragment-- onViewStateRestored
HomeFragment-- onStart
HomeFragment-- onResume
GalleryFragment-- onPause
GalleryFragment-- onStop
GalleryFragment-- onDestroyView
GalleryFragment-- onDestroy
GalleryFragment onDestroy
GalleryFragment-- onDetach
直接按桌面/最近任务
HomeFragment-- onPause
HomeFragment-- onStop
切回app
HomeFragment-- onStart
HomeFragment-- onResume
退出app
HomeFragment-- onPause
HomeFragment-- onStop
HomeFragment-- onDestroyView
HomeFragment-- onDestroy
HomeFragment-- onDetach
文档信息
- 本文作者:itlgl
- 本文链接:https://itlgl.com/note/2021/11/19/issues-52/
- 版权声明:自由转载-非商用-非衍生-保持署名(创意共享3.0许可证)