, , ( , ) , fragmentTransaction.addToBackStack(): , backstack, .
:
addToBackStack(), , , "".
, 2 :
fragmentTransaction.replace(containerViewId, fragment2);
fragmentTransaction.addToBackStack();
fragmentTransaction.commit();
3:
fragmentTransaction.disallowAddToBackStack()//or just no call to addToBackStack - you do not say
fragmentTransaction.replace(containerViewId, newfragment1);
fragmentTransaction.commit();
Fragment2 , backstack Fragment1. 4 , , 1 .
, , . , , , , .