I\'m wondering if this is actually a bug in the Android API:
I have a setup like so:
┌----┬---------┐
| | |
| 1 | 2 |
| |┌------
.. you can cleanup your nested fragment in the parent fragment's destroyview
method:
@Override
public void onDestroyView() {
try{
FragmentTransaction transaction = getSupportFragmentManager()
.beginTransaction();
transaction.remove(nestedFragment);
transaction.commit();
}catch(Exception e){
}
super.onDestroyView();
}