My layout structure is as follows
Layout A
--------------------------------------
| ------------------------------- |
| | Layout B | |
| | | |
| | | |
| | | |
| ------------------------------- |
| |
| |
| |
--------------------------------------
Below layout B is another View. Layout A contains a fragment F1 which in turn adds a fragment F11 in layout B Now sometimes I want to replace fragment F11 in layout B with fragment F12 and sometimes I replace Fragment F1 in layout A with another fragment F2 As long as I'm replacing fragments inside layout B it's fine. But the main problem comes when I replace F1 with F2. Consider the scenario where I have F11 inside F1. Now I replace F1 with F2. Now when I hit the back key F11 is not visible anymore. What is the problem here and How do I go about handling it