0

I have an activity. When it starts it loads Fragment A in onCreate using replace. This is not added to the back stack.

I then want Fragment B, an overlay, to be added on top of the previous fragment. This is because i still want you to still be able to see Fragment A behind it as Fragment B has a translucent background. This is loaded using add and is added to the back stack.

From Fragment B i load Fragment C using replace and add to the back stack. This is because Fragment C is not an overlay like Fragment B. When i'm in Fragment C i want to go back to Fragment B on back press. I override on back press and pop the back stack.

The issue is when i press the back button i see Fragment A and not Fragment B. Even though i have debugged and can see Fragment B in the back stack. Why is this?

Mike Scamell
  • 600
  • 1
  • 6
  • 14

0 Answers0