码迷,mamicode.com
首页 > 其他好文 > 详细

Fragment生命周期

时间:2018-05-21 16:18:55      阅读:161      评论:0      收藏:0      [点我收藏+]

标签:detach   nat   java   att   com   onstop   fragment   stop   bsp   

启动Fragment

05-21 14:47:21.514 25477-25477/com.example.kaige.fragmenttest1 I/RightFragment: onAttach
05-21 14:47:21.514 25477-25477/com.example.kaige.fragmenttest1 I/RightFragment: onCreate: 
05-21 14:47:21.514 25477-25477/com.example.kaige.fragmenttest1 I/RightFragment: onCreateView: 
05-21 14:47:21.522 25477-25477/com.example.kaige.fragmenttest1 I/RightFragment: onActivityCreated: 
05-21 14:47:21.522 25477-25477/com.example.kaige.fragmenttest1 I/RightFragment: onStart: 
05-21 14:47:21.522 25477-25477/com.example.kaige.fragmenttest1 I/RightFragment: onResume

厉害当前Fragment

05-21 14:54:14.786 25477-25477/com.example.kaige.fragmenttest1 I/RightFragment: onPause: 
05-21 14:54:14.786 25477-25477/com.example.kaige.fragmenttest1 I/RightFragment: onStop: 
05-21 14:54:14.786 25477-25477/com.example.kaige.fragmenttest1 I/RightFragment: onDestroyView: 

重新回到屏幕

05-21 14:56:00.446 25477-25477/com.example.kaige.fragmenttest1 I/RightFragment: onCreateView: 
05-21 14:56:00.446 25477-25477/com.example.kaige.fragmenttest1 I/RightFragment: onActivityCreated: 
05-21 14:56:00.446 25477-25477/com.example.kaige.fragmenttest1 I/RightFragment: onStart: 
05-21 14:56:00.446 25477-25477/com.example.kaige.fragmenttest1 I/RightFragment: onResume

 退出

05-21 15:02:27.418 25477-25477/com.example.kaige.fragmenttest1 I/RightFragment: onPause: 
05-21 15:02:27.418 25477-25477/com.example.kaige.fragmenttest1 I/RightFragment: onStop: 
05-21 15:02:27.418 25477-25477/com.example.kaige.fragmenttest1 I/RightFragment: onDestroyView: 
05-21 15:02:27.418 25477-25477/com.example.kaige.fragmenttest1 I/RightFragment: onDestroy: 
05-21 15:02:27.418 25477-25477/com.example.kaige.fragmenttest1 I/RightFragment: onDetach

不退出 按下home键

05-21 15:02:14.742 25477-25477/com.example.kaige.fragmenttest1 I/RightFragment: onPause: 
05-21 15:02:15.730 25477-25477/com.example.kaige.fragmenttest1 I/RightFragment: onStop: 

  

 

 

 

Fragment生命周期

标签:detach   nat   java   att   com   onstop   fragment   stop   bsp   

原文地址:https://www.cnblogs.com/412013cl/p/9067270.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!