摘要: Fragment在Android3.0开始提供,并且在兼容包中也提供了Fragment特性的支持。Fragment的推出让我们编写和管理用户界面更快捷更方便了。但当我们实例化自定义Fragment时,为什么官方推荐Fragment.setArguments(Bundle bundle)这种方式来传递... 阅读全文
posted @ 2015-08-11 23:08 北斗极星 阅读(523) 评论(0) 推荐(0) 编辑
摘要: I recently came across an interesting question on StackOverflow regarding Fragment instantiation:What is the difference between new MyFragment() and M... 阅读全文
posted @ 2015-08-11 22:34 北斗极星 阅读(181) 评论(0) 推荐(0) 编辑
摘要: 主要看两张图,和跑代码一,Fragment的生命周 二,与Activity生命周期的对比 场景演示 : 切换到该Fragment11-29 14:26:35.095: D/AppListFragment(7649): onAttach11-29 14:26:35.095: D/AppList... 阅读全文
posted @ 2015-08-11 00:06 北斗极星 阅读(184) 评论(0) 推荐(0) 编辑