I have an application with one activity and many fragments that work on tablets with Android 4.0 and user support.library.v4
The first screen shows two fragments A and B:
----------------------------------
A | B <view pager>
|------------------------
<list |
view> |
| <view pager>
|
----------------------------------
After click on A item I add a new fragment A with add to back stask for current fragment A. I show a new fragments A1, C - C includes nested fragments D and E are added via replace(, D, ) without adding to backstak
----------------------------------
A1 | C
|
<list | D | E
view> | |
| |
| |
----------------------------------
The issue occurs when I start working on back behaviour. I start use getShildFragmentManager() for my adapter in fragment B so back start show a previous screen but after multiple clicks between this fragments: A -> A1, C(D,E) -> BACK -> A -> A1, C(D,E) -> BACK -> A -> A1, C(D,E) -> BACK -> [ISSUE] I see a fragment A but don't see a fragment B sometimes is just background from previous fragment D and E
Could you tell me where is my issue?
ADDITIONAL INFO 1) I set layout with two framelayout-containers for fragments A and B 2) A is list fragment 3) user click on item of A 4) A is replaced by new A instance and A is added in backstak; B is replaced by new fragment C that has layout with two framelayout containers for D and E fragments 5) User click on A instance and C shows D and E fragments via repalce and don't add this transaction into backstack 6) User click BACK 7) return to step 1)