Fragment showing and Activity lifecycle
I thought that when I call
fragment.show(getSupportFragmentManager(), tag);
the activity were to PAUSED state by the calling of the onPause() method. But debugging the project I discovered that no lifecycle method is called. I was planning the flow to use the onPause() and onResume() methods when I call and dismiss a fragment, but it is confusing me. Can someone help me please?
Some observations regarding the show() method:
It is only described by a fragment transaction (does not affect activity into enter onPause() state):
public void show(FragmentManager manager, String tag) { mDismissed = false; mShownByMe = true; FragmentTransaction ft = manager.beginTransaction(); ft.add(this, tag); ft.commit(); }
Detailed information about an Activity lifecycle: link1 and link2
链接地址: http://www.djcxy.com/p/65704.html上一篇: 如何在使用FOR XML PATH时删除嵌套查询中的冗余名称空间
下一篇: 片段显示和活动生命周期