I have one container root in main.xml.
In that container I have added two fragments “Transaction” and “balance”.
Basically after adding transaction balance should be updated and “transaction” fragment should be replaced with “Stats” Fragment.
Currently I am using the replace like :
FragmentTransaction ft = fm.beginTransaction();
ft.replace(R.id.root, BalFrag).commit();
But above code is removing the “balance” fragment and adding new one after “transaction” fragment.
Using 2 Fragments in a single container sounds like a bad idea to me but I think you should be able to replace just one fragment using something like