1

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

pankajagarwal
  • 13,462
  • 14
  • 54
  • 65

1 Answers1

2

The behaviour of nested fragments is undefined, see @hackbod's answer here

Community
  • 1
  • 1
PJL
  • 18,735
  • 17
  • 71
  • 68