博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
activity 与 Fragment生命周期的理解
阅读量:7106 次
发布时间:2019-06-28

本文共 1681 字,大约阅读时间需要 5 分钟。

景演示 : 切换到该Fragment

11-29 14:26:35.095: D/AppListFragment(7649): onAttach

11-29 14:26:35.095: D/AppListFragment(7649): onCreate
11-29 14:26:35.095: D/AppListFragment(7649): onCreateView
11-29 14:26:35.100: D/AppListFragment(7649): onActivityCreated
11-29 14:26:35.120: D/AppListFragment(7649): onStart
11-29 14:26:35.120: D/AppListFragment(7649): onResume

屏幕灭掉:

11-29 14:27:35.185: D/AppListFragment(7649): onPause

11-29 14:27:35.205: D/AppListFragment(7649): onSaveInstanceState
11-29 14:27:35.205: D/AppListFragment(7649): onStop

 

屏幕解锁

11-29 14:33:13.240: D/AppListFragment(7649): onStart

11-29 14:33:13.275: D/AppListFragment(7649): onResume

 

切换到其他Fragment:

11-29 14:33:33.655: D/AppListFragment(7649): onPause
11-29 14:33:33.655: D/AppListFragment(7649): onStop
11-29 14:33:33.660: D/AppListFragment(7649): onDestroyView

 

切换回本身的Fragment:

11-29 14:33:55.820: D/AppListFragment(7649): onCreateView

11-29 14:33:55.825: D/AppListFragment(7649): onActivityCreated
11-29 14:33:55.825: D/AppListFragment(7649): onStart
11-29 14:33:55.825: D/AppListFragment(7649): onResume

回到桌面

11-29 14:34:26.590: D/AppListFragment(7649): onPause

11-29 14:34:26.880: D/AppListFragment(7649): onSaveInstanceState
11-29 14:34:26.880: D/AppListFragment(7649): onStop

回到应用

11-29 14:36:51.940: D/AppListFragment(7649): onStart

11-29 14:36:51.940: D/AppListFragment(7649): onResume

 

退出应用

11-29 14:37:03.020: D/AppListFragment(7649): onPause

11-29 14:37:03.155: D/AppListFragment(7649): onStop
11-29 14:37:03.155: D/AppListFragment(7649): onDestroyView
11-29 14:37:03.165: D/AppListFragment(7649): onDestroy
11-29 14:37:03.165: D/AppListFragment(7649): onDetach

 

转载于:https://www.cnblogs.com/gentspy/p/5294528.html

你可能感兴趣的文章
谷歌代码库已超过 20 亿行代码,他们是如何管理的?
查看>>
5/30 c语言中的位运算
查看>>
获取周一还是周日作为首日
查看>>
Android闹钟服务详解
查看>>
在代码中,获取Entity Framework生成的T-SQL查询语句
查看>>
面试收集--关于链表的一些面试题
查看>>
bootstrap 标签切换
查看>>
bootstrap01登录小例子
查看>>
hive
查看>>
linux中的fork()函数以及标准I/O缓冲
查看>>
SPL标准库常用的数据结构
查看>>
JavaMail简单接收邮件
查看>>
10月浏览器市场统计:Chrome继续劫掠IE
查看>>
Windows下lex 与 yacc的使用
查看>>
Scrapy基础
查看>>
js刷新当前页面 (转)
查看>>
oracle博客网址
查看>>
查询速度优化用not EXISTS 代替 not in
查看>>
关于php接收http模拟post传json格式时$_POST为空的问题
查看>>
阅读教材后未能解决的问题
查看>>