标签:style blog http java for div 2014 cti log
根据debug信息查看Fragment回退栈的情况,具体debug代码如下:
int num = getActivity().getSupportFragmentManager().getBackStackEntryCount(); String numString = "++++++++++++++++++++++++++++++++++Fragment回退栈数量:"+num; TALogger.d("Fragment", numString); for (int i = 0; i < num; i++) { BackStackEntry backstatck = getActivity().getSupportFragmentManager().getBackStackEntryAt(i); TALogger.d("Fragment", backstatck.getName()); }
debug结果截图如下:
最后一步是调用:
getActivity().getSupportFragmentManager().popBackStackImmediate(CreateGroupNameFragment.class.getName(), FragmentManager.POP_BACK_STACK_INCLUSIVE);
即弹出Tag为CreateGroupNameFragment之上的所有(包括自身)的Fragment。
清空Fragment回退栈中某个Fragment之上的所有Fragment
标签:style blog http java for div 2014 cti log
原文地址:http://www.cnblogs.com/qixing/p/4015262.html