private static void changeFragment(Fragment f, boolean init) {
FragmentTransaction ft = fm.beginTransaction();
ft.replace(R.id.info_content, f,f.getClass().getName());
if(!init){
ft.addToBackStack(null);
}
ft.commit();
}
when I want to get the stack cout by call fm.getBackStackEntryCount(), it returns zero?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…