I have a layout designed as
_________________________________
|Option A| |
|________| |
|Option B| |
|________| Fragment X |
|Option C| of |
|________| Option i |
|Option D| (i is (A,B,C or D)) |
|________|______________________|
Option A --> A1 fragment -->A2 fragment--->A3 fragment
Option B --> B1 fragment -->B2 fragment--->B3 fragment
Option C --> C1 fragment -->C2 fragment--->C3 fragment
Option D --> D1 fragment -->D2 fragment--->D3 fragment
These all fragments are in one Activity.
Clicking on option A,B,C,D opens fragment A1,B1,C1,D1 respectively. From those fragments I can navigate internally till level 2/3/back (levels here are representative of depth,nothing much technical). However option A,B,C and D can still be clicked.
WHAT I HAVE: User is in Fragment B2. He clicks on Option D, D1 comes up he can navigate till D3. Now,when user clicks on option B he goes to B1 fragment.
WHAT I WANT: User is in Fragment B2. He clicks on Option D, and navigates till D3. When user clicks on option B he should go to B2 (rather than B1).
WHERE AM I STUCK: How to get the state B2 and use it so that I also have backStack compatibility.
WHAT I THINK: I think I should have a separate fragment manager for each option. But I am unable to set the fragment(B2 in our case).
0 comments:
Post a Comment