[ACCEPTED]-Android: Remove ALL FragmentTransactions from the back stack-android-fragments

Accepted answer
Score: 109

If you add many Fragments to the backstack 1 and want to remove them all you can do this: popBackStack(null, FragmentManager.POP_BACK_STACK_INCLUSIVE)

Score: 1

Just remove them from the backstack using 4 the popBackStack() methods.

Each fragment you pop is exactly 3 the same as if the user had pressed the 2 BACK button, and you don't do any special cleanup 1 when the BACK button is pressed, right?

More Related questions