Having Fragment A and B, B is kinda of extended A. The UI data update from B need to store back in A and A's UI makes decision whether to save to database.
So A is put on the backstack first, then at some time it needs B and B is put on the backstack and in the holder with 'replace()'.
Passing data to B could be don by argument. How to pass data back from B fragment to the A fragment (if A is 'replaced()' by B on the holder and currently not showing or 'existing')?
Bundle args = new Bundle();
args.putSerializable(TAG_MY_CLASS, myClass);
Fragment bFrgmt = new B();
bFrgmt.setArguments(args);
getFragmentManager()
.beginTransaction()
.replace(R.id.holder, bFrgmt, TAG_B_FRAGMENT)
.addToBackStack(TAG_B_FRAGMENT).commit();