android Fragment
16lz
2021-01-23
http://developer.android.com/reference/android/app/Fragment.html
基本上翻译加上开发使用
1基本:
onAttach(Activity)
called once the fragment is associated with its activity.onCreate(Bundle)
called to do initial creation of the fragment.onCreateView(LayoutInflater, ViewGroup, Bundle)
creates and returns the view hierarchy associated with the fragment.onActivityCreated(Bundle)
tells the fragment that its activity has completed its ownActivity.onCreate()
.onViewStateRestored(Bundle)
tells the fragment that all of the saved state of its view hierarchy has been restored.onStart()
makes the fragment visible to the user (based on its containing activity being started).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:
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.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.onDestroyView()
allows the fragment to clean up resources associated with its View.onDestroy()
called to do final cleanup of the fragment's state.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
更多相关文章
- 代码中设置drawableleft
- android 3.0 隐藏 系统标题栏
- Android开发中activity切换动画的实现
- Android(安卓)学习 笔记_05. 文件下载
- Android中直播视频技术探究之—摄像头Camera视频源数据采集解析
- 技术博客汇总
- android 2.3 wifi (一)
- AndRoid Notification的清空和修改
- Android中的Chronometer