http://developer.android.com/reference/android/app/Fragment.html

基本上翻译加上开发使用

1基本:

  1. onAttach(Activity) called once the fragment is associated with its activity.
  2. onCreate(Bundle) called to do initial creation of the fragment.
  3. onCreateView(LayoutInflater, ViewGroup, Bundle) creates and returns the view hierarchy associated with the fragment.
  4. onActivityCreated(Bundle) tells the fragment that its activity has completed its own Activity.onCreate().
  5. onViewStateRestored(Bundle) tells the fragment that all of the saved state of its view hierarchy has been restored.
  6. onStart() makes the fragment visible to the user (based on its containing activity being started).
  7. onResume() makes the fragment interacting with the user (based on its containing activity being resumed).

As a fragment is no longer being used, it goes through a reverse series of callbacks:

  1. onPause() fragment is no longer interacting with the user either because its activity is being paused or a fragment operation is modifying it in the activity.
  2. onStop() fragment is no longer visible to the user either because its activity is being stopped or a fragment operation is modifying it in the activity.
  3. onDestroyView() allows the fragment to clean up resources associated with its View.
  4. onDestroy() called to do final cleanup of the fragment's state.
  5. onDetach() called immediately prior to the fragment no longer being associated with its activity.

http://www.cnblogs.com/mengdd/archive/2013/01/08/2851368.html

更多相关文章

  1. Android使用View类动画
  2. android跳转到卸载页面
  3. android API Demo之使用ViewFlipper制作轮播广告
  4. Android使用SAX解析XML(4)
  5. 【Android】Menu不同菜单的使用介绍
  6. 如何在Android平台上创建自定义的Cordova插件并使用SAP UI5消费
  7. 箭头函数的基础使用
  8. NPM 和webpack 的基础使用
  9. Python list sort方法的具体使用

随机推荐

  1. uri is not registered
  2. Android 使用zxing扫描二维码横屏转竖屏
  3. 小米5手机Android运行程序闪退出错解决方
  4. 携程Android App插件化和动态加载实践
  5. Android 查看SHA1值的方法
  6. Android中TextClock中的一个abc函数
  7. 从另一种方式理解Android消息处理机制
  8. Android实现类似有Table边框的布局
  9. Android 快速学习onTouch,并完成实验单点
  10. Android Glide加载图片,宽度占满屏幕高度