android学习八 多用途碎片
碎片设计初衷:帮助开发人员管理应用程序功能。
.png)
(FragmentOther)getFragmentManager().findFragmentByTag(“other”);
fragOther.callCustomMethod( arg1, arg2 );
mCalledFragment.setTargetFragment(this, 0); //B碎片将当前的A碎片设置为目标碎片
fm.beginTransaction().add(mCalledFragment, "work").commit();
getTargetFragment().getView().findViewById(R.id.text1);
tv.setText(“Set from the called fragment”);
10-19 00:59:49.450: V/FragmentManager(7837): onCreateView: id=0x7f090041 fname=com.example.fragmentlifetimetest.TitleFragment existing=null
10-19 00:59:49.450: V/FragmentLifeTimeTest Log:(7837): TitleFragment.onInflate is called!
10-19 00:59:49.450: V/FragmentLifeTimeTest Log:(7837): id = @2131296321
10-19 00:59:49.450: V/FragmentLifeTimeTest Log:(7837): layout_width = -1
10-19 00:59:49.450: V/FragmentLifeTimeTest Log:(7837): layout_height = -1
10-19 00:59:49.450: V/FragmentLifeTimeTest Log:(7837): class = com.example.fragmentlifetimetest.TitleFragment
10-19 00:59:49.450: V/FragmentManager(7837): add: TitleFragment{42608e10 id=0x7f090041}
10-19 00:59:49.450: V/FragmentManager(7837): Allocated fragment index TitleFragment{42608e10 #0 id=0x7f090041}
10-19 00:59:49.460: V/FragmentManager(7837): moveto CREATED: TitleFragment{42608e10 #0 id=0x7f090041}
10-19 00:59:49.460: V/FragmentLifeTimeTest Log:(7837): TitleFragment.onAttach is called!
10-19 00:59:49.460: V/FragmentLifeTimeTest Log:(7837): in MainActivity onAttachFragment. fragment id = 2131296321
10-19 00:59:49.460: V/FragmentLifeTimeTest Log:(7837): TitleFragment.onCreate is called!
10-19 00:59:49.460: V/FragmentLifeTimeTest Log:(7837): savedInstanceState is null!
10-19 00:59:49.460: V/FragmentLifeTimeTest Log:(7837): TitleFragment.onCreateView is called!
10-19 00:59:49.460: V/FragmentLifeTimeTest Log:(7837): MainActivity.onStart is called!
10-19 00:59:49.490: V/FragmentManager(7837): moveto ACTIVITY_CREATED: TitleFragment{42608e10 #0 id=0x7f090041}
10-19 00:59:49.490: V/FragmentLifeTimeTest Log:(7837): TitleFragment.onActivityCreated is called!
10-19 00:59:49.490: V/FragmentLifeTimeTest Log:(7837): savedInstanceState is null!
10-19 00:59:49.490: V/FragmentLifeTimeTest Log:(7837): MainActivity.showDetail is called!
10-19 00:59:49.520: V/FragmentManager(7837): moveto STARTED: TitleFragment{42608e10 #0 id=0x7f090041}
10-19 00:59:49.520: V/FragmentLifeTimeTest Log:(7837): TitleFragment.onStart is called!
10-19 00:59:49.520: V/FragmentLifeTimeTest Log:(7837): MainActivity.onResume is called!
10-19 00:59:49.520: V/FragmentManager(7837): moveto RESUMED: TitleFragment{42608e10 #0 id=0x7f090041}
10-19 00:59:49.520: V/FragmentLifeTimeTest Log:(7837): TitleFragment.onResume is called!
10-19 00:59:49.520: V/FragmentLifeTimeTest Log:(7837): MainActivity.onSaveInstanceState is called!
10-19 00:59:49.520: V/FragmentLifeTimeTest Log:(7837): TitleFragment.onSaveInstanceState is called! save curChoice=0
10-19 00:59:49.530: V/FragmentManager(7837): Saved state of TitleFragment{42608e10 #0 id=0x7f090041}: Bundle[{android:view_state=android.util.SparseArray@4260f6d8, curChoice=0}]
10-19 00:59:49.530: V/FragmentManager(7837): saveAllState: adding fragment #0: TitleFragment{42608e10 #0 id=0x7f090041}
10-19 00:59:49.530: V/FragmentLifeTimeTest Log:(7837): MainActivity.onPause is called!
10-19 00:59:49.530: V/FragmentManager(7837): movefrom RESUMED: TitleFragment{42608e10 #0 id=0x7f090041}
10-19 00:59:49.530: V/FragmentLifeTimeTest Log:(7837): TitleFragment.onPause is called!
10-19 00:59:49.580: V/FragmentLifeTimeTest Log:(7837): DetailActivity.onCreate called!
10-19 00:59:49.580: V/FragmentLifeTimeTest Log:(7837): DetailFragment.newInstance(Bundle) called! index=0
10-19 00:59:49.580: V/FragmentLifeTimeTest Log:(7837): DetailFragment.newInstance(int) called! index=0
10-19 00:59:49.580: V/FragmentLifeTimeTest Log:(7837): newInstance end
10-19 00:59:49.580: V/FragmentManager(7837): Commit: BackStackEntry{42615220}
10-19 00:59:49.580: D/FragmentManager(7837): mName=null mIndex=-1 mCommitted=false
10-19 00:59:49.580: D/FragmentManager(7837): Operations:
10-19 00:59:49.580: D/FragmentManager(7837): Op #0: ADD DetailFragment{42615098 id=0x1020002}
10-19 00:59:49.580: V/FragmentLifeTimeTest Log:(7837): DetailActivity.onStart begin
10-19 00:59:49.580: V/FragmentManager(7837): Run: BackStackEntry{42615220}
10-19 00:59:49.580: V/FragmentManager(7837): add: DetailFragment{42615098 id=0x1020002}
10-19 00:59:49.580: V/FragmentManager(7837): Allocated fragment index DetailFragment{42615098 #0 id=0x1020002}
10-19 00:59:49.580: V/FragmentManager(7837): moveto CREATED: DetailFragment{42615098 #0 id=0x1020002}
10-19 00:59:49.580: V/FragmentLifeTimeTest Log:(7837): DetailFragment.onAttach called!
10-19 00:59:49.580: V/FragmentLifeTimeTest Log:(7837): DetailFragment.onCreate called!
10-19 00:59:49.580: V/FragmentLifeTimeTest Log:(7837): savedInstanceState is null!
10-19 00:59:49.580: V/FragmentManager(7837): moveto ACTIVITY_CREATED: DetailFragment{42615098 #0 id=0x1020002}
10-19 00:59:49.590: V/FragmentLifeTimeTest Log:(7837): DetailFragment.onCreateView called!
10-19 00:59:49.590: V/FragmentLifeTimeTest Log:(7837): DetailFragment.onActivityCreated called!
10-19 00:59:49.590: V/FragmentLifeTimeTest Log:(7837): savedInstanceState is null!
10-19 00:59:49.590: V/FragmentManager(7837): moveto STARTED: DetailFragment{42615098 #0 id=0x1020002}
10-19 00:59:49.590: V/FragmentLifeTimeTest Log:(7837): DetailFragment.onStart called!
10-19 00:59:49.590: V/FragmentLifeTimeTest Log:(7837): DetailActivity.onResume begin
10-19 00:59:49.590: V/FragmentManager(7837): moveto RESUMED: DetailFragment{42615098 #0 id=0x1020002}
10-19 00:59:49.590: V/FragmentLifeTimeTest Log:(7837): DetailFragment.onResume called!
10-19 00:59:49.870: V/FragmentLifeTimeTest Log:(7837): MainActivity.onStop is called!
10-19 00:59:49.870: V/FragmentManager(7837): movefrom STARTED: TitleFragment{42608e10 #0 id=0x7f090041}
10-19 00:59:49.870: V/FragmentLifeTimeTest Log:(7837): TitleFragment.onStop is called!
10-19 00:59:49.870: V/FragmentManager(7837): movefrom STOPPED: TitleFragment{42608e10 #0 id=0x7f090041}
10-19 00:59:52.533: V/FragmentLifeTimeTest Log:(7837): DetailActivity.finish begin
10-19 00:59:52.543: V/FragmentLifeTimeTest Log:(7837): DetailActivity.onPause begin
10-19 00:59:52.543: V/FragmentManager(7837): movefrom RESUMED: DetailFragment{42615098 #0 id=0x1020002}
10-19 00:59:52.543: V/FragmentLifeTimeTest Log:(7837): DetailFragment.onPause called!
10-19 00:59:52.563: V/FragmentLifeTimeTest Log:(7837): MainActivity.onStart is called!
10-19 00:59:52.563: V/FragmentManager(7837): moveto STARTED: TitleFragment{42608e10 #0 id=0x7f090041}
10-19 00:59:52.563: V/FragmentLifeTimeTest Log:(7837): TitleFragment.onStart is called!
10-19 00:59:52.563: V/FragmentLifeTimeTest Log:(7837): MainActivity.onResume is called!
10-19 00:59:52.563: V/FragmentManager(7837): moveto RESUMED: TitleFragment{42608e10 #0 id=0x7f090041}
10-19 00:59:52.563: V/FragmentLifeTimeTest Log:(7837): TitleFragment.onResume is called!
10-19 00:59:52.833: V/FragmentLifeTimeTest Log:(7837): DetailActivity.onStop begin
10-19 00:59:52.833: V/FragmentManager(7837): movefrom STARTED: DetailFragment{42615098 #0 id=0x1020002}
10-19 00:59:52.843: V/FragmentLifeTimeTest Log:(7837): DetailFragment.onStop called!
10-19 00:59:52.843: V/FragmentLifeTimeTest Log:(7837): DetailActivity.onDestroy begin
10-19 00:59:52.843: V/FragmentManager(7837): movefrom STOPPED: DetailFragment{42615098 #0 id=0x1020002}
10-19 00:59:52.843: V/FragmentManager(7837): movefrom ACTIVITY_CREATED: DetailFragment{42615098 #0 id=0x1020002}
10-19 00:59:52.843: V/FragmentLifeTimeTest Log:(7837): DetailFragment.onDestroyView called! view=android.support.v4.app.NoSaveStateFrameLayout@4261b5d8
10-19 00:59:52.843: V/FragmentManager(7837): movefrom CREATED: DetailFragment{42615098 #0 id=0x1020002}
10-19 00:59:52.853: V/FragmentLifeTimeTest Log:(7837): DetailFragment.onDestroy called!
10-19 00:59:52.853: V/FragmentLifeTimeTest Log:(7837): DetailFragment.onDetach called!
10-19 00:59:52.853: V/FragmentManager(7837): Freeing fragment index DetailFragment{42615098 #0 id=0x1020002}
10-19 00:59:55.596: V/FragmentLifeTimeTest Log:(7837): TitleFragment.onListItemClick is called! position=3
10-19 00:59:55.596: V/FragmentLifeTimeTest Log:(7837): MainActivity.showDetail is called!
10-19 00:59:55.616: V/FragmentLifeTimeTest Log:(7837): MainActivity.onSaveInstanceState is called!
10-19 00:59:55.616: V/FragmentLifeTimeTest Log:(7837): TitleFragment.onSaveInstanceState is called! save curChoice=3
10-19 00:59:55.626: V/FragmentManager(7837): Saved state of TitleFragment{42608e10 #0 id=0x7f090041}: Bundle[{android:view_state=android.util.SparseArray@42622708, curChoice=3}]
10-19 00:59:55.626: V/FragmentManager(7837): saveAllState: adding fragment #0: TitleFragment{42608e10 #0 id=0x7f090041}
10-19 00:59:55.626: V/FragmentLifeTimeTest Log:(7837): MainActivity.onPause is called!
10-19 00:59:55.626: V/FragmentManager(7837): movefrom RESUMED: TitleFragment{42608e10 #0 id=0x7f090041}
10-19 00:59:55.626: V/FragmentLifeTimeTest Log:(7837): TitleFragment.onPause is called!
10-19 00:59:55.646: V/FragmentLifeTimeTest Log:(7837): DetailActivity.onCreate called!
10-19 00:59:55.646: V/FragmentLifeTimeTest Log:(7837): DetailFragment.newInstance(Bundle) called! index=3
10-19 00:59:55.646: V/FragmentLifeTimeTest Log:(7837): DetailFragment.newInstance(int) called! index=3
10-19 00:59:55.646: V/FragmentLifeTimeTest Log:(7837): newInstance end
10-19 00:59:55.646: V/FragmentManager(7837): Commit: BackStackEntry{42625790}
10-19 00:59:55.646: D/FragmentManager(7837): mName=null mIndex=-1 mCommitted=false
10-19 00:59:55.646: D/FragmentManager(7837): Operations:
10-19 00:59:55.646: D/FragmentManager(7837): Op #0: ADD DetailFragment{42625608 id=0x1020002}
10-19 00:59:55.646: V/FragmentLifeTimeTest Log:(7837): DetailActivity.onStart begin
10-19 00:59:55.646: V/FragmentManager(7837): Run: BackStackEntry{42625790}
10-19 00:59:55.646: V/FragmentManager(7837): add: DetailFragment{42625608 id=0x1020002}
10-19 00:59:55.656: V/FragmentManager(7837): Allocated fragment index DetailFragment{42625608 #0 id=0x1020002}
10-19 00:59:55.656: V/FragmentManager(7837): moveto CREATED: DetailFragment{42625608 #0 id=0x1020002}
10-19 00:59:55.656: V/FragmentLifeTimeTest Log:(7837): DetailFragment.onAttach called!
10-19 00:59:55.656: V/FragmentLifeTimeTest Log:(7837): DetailFragment.onCreate called!
10-19 00:59:55.656: V/FragmentLifeTimeTest Log:(7837): savedInstanceState is null!
10-19 00:59:55.656: V/FragmentManager(7837): moveto ACTIVITY_CREATED: DetailFragment{42625608 #0 id=0x1020002}
10-19 00:59:55.656: V/FragmentLifeTimeTest Log:(7837): DetailFragment.onCreateView called!
10-19 00:59:55.656: V/FragmentLifeTimeTest Log:(7837): DetailFragment.onActivityCreated called!
10-19 00:59:55.656: V/FragmentLifeTimeTest Log:(7837): savedInstanceState is null!
10-19 00:59:55.656: V/FragmentManager(7837): moveto STARTED: DetailFragment{42625608 #0 id=0x1020002}
10-19 00:59:55.666: V/FragmentLifeTimeTest Log:(7837): DetailFragment.onStart called!
10-19 00:59:55.666: V/FragmentLifeTimeTest Log:(7837): DetailActivity.onResume begin
10-19 00:59:55.666: V/FragmentManager(7837): moveto RESUMED: DetailFragment{42625608 #0 id=0x1020002}
10-19 00:59:55.666: V/FragmentLifeTimeTest Log:(7837): DetailFragment.onResume called!
10-19 00:59:55.997: V/FragmentLifeTimeTest Log:(7837): MainActivity.onStop is called!
10-19 00:59:55.997: V/FragmentManager(7837): movefrom STARTED: TitleFragment{42608e10 #0 id=0x7f090041}
10-19 00:59:55.997: V/FragmentLifeTimeTest Log:(7837): TitleFragment.onStop is called!
10-19 00:59:55.997: V/FragmentManager(7837): movefrom STOPPED: TitleFragment{42608e10 #0 id=0x7f090041}
10-19 00:59:58.249: V/FragmentLifeTimeTest Log:(7837): DetailActivity.onSaveInstanceState begin
10-19 00:59:58.249: V/FragmentLifeTimeTest Log:(7837): DetailFragment.onSaveInstanceState called!
10-19 00:59:58.249: V/FragmentManager(7837): Saved state of DetailFragment{42625608 #0 id=0x1020002}: Bundle[{android:view_state=android.util.SparseArray@4262f850}]
10-19 00:59:58.249: V/FragmentManager(7837): saveAllState: adding fragment #0: DetailFragment{42625608 #0 id=0x1020002}
10-19 00:59:58.249: V/FragmentLifeTimeTest Log:(7837): DetailActivity.onPause begin
10-19 00:59:58.249: V/FragmentManager(7837): movefrom RESUMED: DetailFragment{42625608 #0 id=0x1020002}
10-19 00:59:58.249: V/FragmentLifeTimeTest Log:(7837): DetailFragment.onPause called!
10-19 00:59:58.249: V/FragmentLifeTimeTest Log:(7837): DetailActivity.onStop begin
10-19 00:59:58.249: V/FragmentManager(7837): movefrom STARTED: DetailFragment{42625608 #0 id=0x1020002}
10-19 00:59:58.249: V/FragmentLifeTimeTest Log:(7837): DetailFragment.onStop called!
10-19 00:59:58.249: V/FragmentManager(7837): movefrom STOPPED: DetailFragment{42625608 #0 id=0x1020002}
10-19 00:59:58.259: V/FragmentLifeTimeTest Log:(7837): DetailActivity.onDestroy begin
10-19 00:59:58.259: V/FragmentManager(7837): movefrom ACTIVITY_CREATED: DetailFragment{42625608 #0 id=0x1020002}
10-19 00:59:58.269: V/FragmentLifeTimeTest Log:(7837): DetailFragment.onDestroyView called! view=android.support.v4.app.NoSaveStateFrameLayout@4262b760
10-19 00:59:58.269: V/FragmentManager(7837): movefrom CREATED: DetailFragment{42625608 #0 id=0x1020002}
10-19 00:59:58.269: V/FragmentLifeTimeTest Log:(7837): DetailFragment.onDestroy called!
10-19 00:59:58.269: V/FragmentLifeTimeTest Log:(7837): DetailFragment.onDetach called!
10-19 00:59:58.269: V/FragmentManager(7837): Freeing fragment index DetailFragment{42625608 #0 id=0x1020002}
10-19 00:59:58.299: V/FragmentManager(7837): Instantiated fragment DetailFragment{42633190 #0 id=0x1020002}
10-19 00:59:58.299: V/FragmentManager(7837): restoreAllState: active #0: DetailFragment{42633190 #0 id=0x1020002}
10-19 00:59:58.299: V/FragmentManager(7837): restoreAllState: added #0: DetailFragment{42633190 #0 id=0x1020002}
10-19 00:59:58.299: V/FragmentManager(7837): moveto CREATED: DetailFragment{42633190 #0 id=0x1020002}
10-19 00:59:58.299: V/FragmentLifeTimeTest Log:(7837): DetailFragment.onAttach called!
10-19 00:59:58.299: V/FragmentLifeTimeTest Log:(7837): DetailFragment.onCreate called!
10-19 00:59:58.299: V/FragmentLifeTimeTest Log:(7837): key = android:view_state
10-19 00:59:58.299: V/FragmentLifeTimeTest Log:(7837): DetailActivity.onCreate called!
10-19 00:59:58.299: V/FragmentLifeTimeTest Log:(7837): DetailActivity.finish begin
10-19 00:59:58.329: V/FragmentLifeTimeTest Log:(7837): MainActivity.onDestroy is called!
10-19 00:59:58.329: V/FragmentManager(7837): movefrom ACTIVITY_CREATED: TitleFragment{42608e10 #0 id=0x7f090041}
10-19 00:59:58.329: V/FragmentLifeTimeTest Log:(7837): TitleFragment.onDestroyView is called! view=android.support.v4.app.NoSaveStateFrameLayout@4260cae8
10-19 00:59:58.329: V/FragmentManager(7837): movefrom CREATED: TitleFragment{42608e10 #0 id=0x7f090041}
10-19 00:59:58.329: V/FragmentLifeTimeTest Log:(7837): TitleFragment.onDestroy is called!
10-19 00:59:58.329: V/FragmentLifeTimeTest Log:(7837): TitleFragment.onDetach is called!
10-19 00:59:58.329: V/FragmentManager(7837): Freeing fragment index TitleFragment{42608e10 #0 id=0x7f090041}
10-19 00:59:58.339: V/FragmentLifeTimeTest Log:(7837): MainActivity.onCreate is called!
10-19 00:59:58.339: V/FragmentManager(7837): Instantiated fragment TitleFragment{42636b58 #0 id=0x7f090041}
10-19 00:59:58.339: V/FragmentManager(7837): restoreAllState: active #0: TitleFragment{42636b58 #0 id=0x7f090041}
10-19 00:59:58.339: V/FragmentManager(7837): restoreAllState: added #0: TitleFragment{42636b58 #0 id=0x7f090041}
10-19 00:59:58.339: V/FragmentManager(7837): onCreateView: id=0x7f090041 fname=com.example.fragmentlifetimetest.TitleFragment existing=TitleFragment{42636b58 #0 id=0x7f090041}
10-19 00:59:58.339: V/FragmentLifeTimeTest Log:(7837): TitleFragment.onInflate is called!
10-19 00:59:58.349: V/FragmentLifeTimeTest Log:(7837): id = @2131296321
10-19 00:59:58.349: V/FragmentLifeTimeTest Log:(7837): background = #550033
10-19 00:59:58.349: V/FragmentLifeTimeTest Log:(7837): layout_width = 0.0px
10-19 00:59:58.349: V/FragmentLifeTimeTest Log:(7837): layout_height = -1
10-19 00:59:58.349: V/FragmentLifeTimeTest Log:(7837): layout_weight = 1.0
10-19 00:59:58.349: V/FragmentLifeTimeTest Log:(7837): class = com.example.fragmentlifetimetest.TitleFragment
10-19 00:59:58.349: V/FragmentManager(7837): moveto CREATED: TitleFragment{42636b58 #0 id=0x7f090041}
10-19 00:59:58.349: V/FragmentLifeTimeTest Log:(7837): TitleFragment.onAttach is called!
10-19 00:59:58.349: V/FragmentLifeTimeTest Log:(7837): in MainActivity onAttachFragment. fragment id = 2131296321
10-19 00:59:58.349: V/FragmentLifeTimeTest Log:(7837): TitleFragment.onCreate is called!
10-19 00:59:58.349: V/FragmentLifeTimeTest Log:(7837): Key=android:view_state
10-19 00:59:58.349: V/FragmentLifeTimeTest Log:(7837): Key=curChoice
10-19 00:59:58.349: V/FragmentLifeTimeTest Log:(7837): TitleFragment.onCreateView is called!
10-19 00:59:58.349: V/FragmentLifeTimeTest Log:(7837): MainActivity.onStart is called!
10-19 00:59:58.349: V/FragmentManager(7837): moveto ACTIVITY_CREATED: TitleFragment{42636b58 #0 id=0x7f090041}
10-19 00:59:58.349: V/FragmentLifeTimeTest Log:(7837): TitleFragment.onActivityCreated is called!
10-19 00:59:58.349: V/FragmentLifeTimeTest Log:(7837): Key=android:view_state
10-19 00:59:58.349: V/FragmentLifeTimeTest Log:(7837): Key=curChoice
10-19 00:59:58.359: V/FragmentLifeTimeTest Log:(7837): MainActivity.showDetail is called!
10-19 00:59:58.359: V/FragmentLifeTimeTest Log:(7837): about to run FragmentTransaction...
10-19 00:59:58.359: V/FragmentLifeTimeTest Log:(7837): DetailFragment.newInstance(int) called! index=3
10-19 00:59:58.359: V/FragmentManager(7837): Commit: BackStackEntry{42640dc0}
10-19 00:59:58.359: D/FragmentManager(7837): mName=null mIndex=-1 mCommitted=false
10-19 00:59:58.359: D/FragmentManager(7837): mEnterAnim=#10a0000 mExitAnim=#10a0001
10-19 00:59:58.359: D/FragmentManager(7837): Operations:
10-19 00:59:58.359: D/FragmentManager(7837): Op #0: REPLACE DetailFragment{42640c38 id=0x7f090042}
10-19 00:59:58.359: D/FragmentManager(7837): enterAnim=#10a0000 exitAnim=#10a0001
10-19 00:59:58.359: V/FragmentManager(7837): Run: BackStackEntry{42640dc0}
10-19 00:59:58.359: V/FragmentManager(7837): OP_REPLACE: adding=DetailFragment{42640c38 id=0x7f090042} old=TitleFragment{42636b58 #0 id=0x7f090041}
10-19 00:59:58.359: V/FragmentManager(7837): add: DetailFragment{42640c38 id=0x7f090042}
10-19 00:59:58.359: V/FragmentManager(7837): Allocated fragment index DetailFragment{42640c38 #1 id=0x7f090042}
10-19 00:59:58.359: V/FragmentManager(7837): moveto CREATED: DetailFragment{42640c38 #1 id=0x7f090042}
10-19 00:59:58.359: V/FragmentLifeTimeTest Log:(7837): DetailFragment.onAttach called!
10-19 00:59:58.359: V/FragmentLifeTimeTest Log:(7837): in MainActivity onAttachFragment. fragment id = 2131296322
10-19 00:59:58.359: V/FragmentLifeTimeTest Log:(7837): DetailFragment.onCreate called!
10-19 00:59:58.359: V/FragmentLifeTimeTest Log:(7837): savedInstanceState is null!
10-19 00:59:58.359: V/FragmentManager(7837): moveto ACTIVITY_CREATED: DetailFragment{42640c38 #1 id=0x7f090042}
10-19 00:59:58.359: V/FragmentLifeTimeTest Log:(7837): DetailFragment.onCreateView called!
10-19 00:59:58.369: V/FragmentLifeTimeTest Log:(7837): DetailFragment.onActivityCreated called!
10-19 00:59:58.369: V/FragmentLifeTimeTest Log:(7837): savedInstanceState is null!
10-19 00:59:58.369: V/FragmentManager(7837): moveto STARTED: TitleFragment{42636b58 #0 id=0x7f090041}
10-19 00:59:58.369: V/FragmentLifeTimeTest Log:(7837): TitleFragment.onStart is called!
10-19 00:59:58.369: V/FragmentManager(7837): moveto STARTED: DetailFragment{42640c38 #1 id=0x7f090042}
10-19 00:59:58.369: V/FragmentLifeTimeTest Log:(7837): DetailFragment.onStart called!
10-19 00:59:58.369: V/FragmentLifeTimeTest Log:(7837): MainActivity.onResume is called!
10-19 00:59:58.369: V/FragmentManager(7837): moveto RESUMED: TitleFragment{42636b58 #0 id=0x7f090041}
10-19 00:59:58.369: V/FragmentLifeTimeTest Log:(7837): TitleFragment.onResume is called!
10-19 00:59:58.369: V/FragmentManager(7837): moveto RESUMED: DetailFragment{42640c38 #1 id=0x7f090042}
10-19 00:59:58.369: V/FragmentLifeTimeTest Log:(7837): DetailFragment.onResume called!
10-19 00:59:58.489: V/FragmentLifeTimeTest Log:(7837): DetailActivity.onDestroy begin
10-19 00:59:58.489: V/FragmentManager(7837): moveto ACTIVITY_CREATED: DetailFragment{42633190 #0 id=0x1020002}
10-19 00:59:58.489: V/FragmentLifeTimeTest Log:(7837): DetailFragment.onCreateView called!
10-19 00:59:58.489: V/FragmentLifeTimeTest Log:(7837): DetailFragment.onActivityCreated called!
10-19 00:59:58.489: V/FragmentLifeTimeTest Log:(7837): key=android:view_state
10-19 00:59:58.489: V/FragmentManager(7837): movefrom ACTIVITY_CREATED: DetailFragment{42633190 #0 id=0x1020002}
10-19 00:59:58.489: V/FragmentLifeTimeTest Log:(7837): DetailFragment.onDestroyView called! view=android.support.v4.app.NoSaveStateFrameLayout@42853930
10-19 00:59:58.489: V/FragmentManager(7837): movefrom CREATED: DetailFragment{42633190 #0 id=0x1020002}
10-19 00:59:58.489: V/FragmentLifeTimeTest Log:(7837): DetailFragment.onDestroy called!
10-19 00:59:58.489: V/FragmentLifeTimeTest Log:(7837): DetailFragment.onDetach called!
10-19 00:59:58.489: V/FragmentManager(7837): Freeing fragment index DetailFragment{42633190 #0 id=0x1020002}
android学习八 多用途碎片的更多相关文章
- Android学习八:获取网络图片
看到QQ群里有个朋友说加载图片内存溢出的问题,所以就按照自己的想法试试的.但是按照他的方法,不知道为何没有发生内存溢出,不知道什么情况. 写这篇文章主要有三个目的: 1.多线程的学习 2.图片加载的学 ...
- android学习九 对话框碎片
1.android的对话框是异步的,对话框创建后马上执行下面的代码.好处: a.通过实现对话框的回调方法反馈用户与对话框的交互. b.能够在代码中清楚对话框. 2.碎片对话框基 ...
- Android学习八---OpenCV JAVA API
OpenCV java API的文档说明在OpenCV-2.4.10-android-sdk/sdk/java/javadoc/index.html的文件夹下. 想用java API的方式进行Open ...
- 八、Android学习第七天——XML文件解析方法(转)
(转自:http://wenku.baidu.com/view/af39b3164431b90d6c85c72f.html) 八.Android学习第七天——XML文件解析方法 XML文件:exten ...
- 【转】Pro Android学习笔记(九八):BroadcastReceiver(2):接收器触发通知
文章转载只能用于非商业性质,且不能带有虚拟货币.积分.注册等附加条件.转载须注明出处:http://blog.sina.com.cn/flowingflying或作者@恺风Wei-傻瓜与非傻瓜 广播接 ...
- 【转】 Pro Android学习笔记(八八):了解Handler(2):什么是Handler
文章转载只能用于非商业性质,且不能带有虚拟货币.积分.注册等附加条件.转载须注明出处:http://blog.csdn.net/flowingflying/ 之前我们有一篇很好的博文<Andro ...
- 【转】 Pro Android学习笔记(八九):了解Handler(3):延迟执行小例子
目录(?)[-] 小例子 Handler的处理 Activity的代码片段 后台线程和UI的互动 文章转载只能用于非商业性质,且不能带有虚拟货币.积分.注册等附加条件.转载须注明出处:http://b ...
- 【转】 Pro Android学习笔记(八六):了解Package(5):使用lib
目录(?)[-] 在项目中使用lib 源代码 了解一些机制 文章转载只能用于非商业性质,且不能带有虚拟货币.积分.注册等附加条件.转载须注明出处:http://blog.csdn.net/flowin ...
- 【转】 Pro Android学习笔记(八四):了解Package(3):包间数据共享
目录(?)[-] 共享User ID的设置 共享资源例子 文章转载只能用于非商业性质,且不能带有虚拟货币.积分.注册等附加条件.转载须注明出处:http://blog.csdn.net/flowing ...
随机推荐
- 【xampp】windows下XAMPP集成环境中,MySQL数据库的使用
在已经安装了XAMPP之后,会在你安装的目录下面出现”XAMPP“文件夹,这个文件夹就是整个XAMPP集成环境的目录. 我们先进入这个目录,然后会看到带有XAMPP标志的xampp-control.e ...
- 开关WI-Fi显示列表
实现效果: 使用方法: Show-NetList #显示Wi-Fi列表 Show-NetList -off #关闭显示 (如图) 实现代码: function Show-NetList { P ...
- springmvc需要掌握的面试知识
1:讲下Spr ingMvc和Struts1,Struts2的比较的优势 性能上Struts1>SpringMvc>Struts2 开发速度上SpringMvc和Struts2差不多,比 ...
- 【翻译】Django Channels 官方文档 -- Tutorial
Django Channels 官方文档 https://channels.readthedocs.io/en/latest/index.html 前言: 最近课程设计需要用到 WebSocket,而 ...
- 系统优化怎么做-Linux系统配置优化
大家好,这里是「聊聊系统优化 」,并在下列地址同步更新 博客园:http://www.cnblogs.com/changsong/ 知乎专栏:https://zhuanlan.zhihu.com/yo ...
- oracle 优化相关
--选择最有效率的表名顺序: Oracle的解析器按照从右到左的顺序处理FROM子句中的表名,FROM子句中写在最后的表(基础表 driving table)将被最先处理, 在FROM子句中包含多 ...
- 解决ssh连接linux系统特别慢的问题
新安装的centos系统,发现ssh连接很慢,因为是测试环境,对安全的要求不高,所以完全可以更快的连接,下面一起来解决这个问题. 一.分析主要原因: 1.SSH的反向DNS解析会消耗大量时间 2.GS ...
- Oracle记录类型(record)和%rowtype
Oracle中的记录类型(record)和使用%rowtype定义的数据类型都是一种单行多列的数据结构,可以理解为一个具有多个属性的对象.其中属性名即为列名. 记录类型(record) 记录类型是一种 ...
- Tomcat性能监控
Tomcat性能监控工具很多,这里介绍两种1.JMeter 2.probe,使用这两种工具都需要在tomcat的安装目录/conf/tomcat-users.xml添加 <tomcat-user ...
- redhat系统升级openssh到7.5
注意,注意,注意重要的事情说三遍,关于ssh的升级不能完全按照别人的教程进行升级,因为每台生产机器都是不一样的,有可能别人能升级成功但是另外一个就可能会失败,因为每台机器上面跑的应用是不一样的,涉及到 ...