Reputation: 1
I have this issue where I have a Fragment A nested within another Fragment B. When I press back I want Fragment B to animate out while Fragment A is still visible. Currently, I am seeing that Fragment A is destroyed before Fragment B animates out. I have seen a solution where we take a bitmap of the screen and set that as the background of Fragment in its onDestroyView(). Are there other solutions to this issue aside from the one I just mentioned?
Upvotes: 0
Views: 587
Reputation: 6438
Fragments inside fragments is a tricky task, and until recently was an unsupported practice (see Fragment Inside Fragment for more on that). Why not nest both your fragments in a single activity that way they can be managed independently?
Upvotes: 1