How do popBackStack() and replace() operations differ?
replace() does 2 things: Remove currently added fragment (A) from the container (C) you indicated Add new fragment (B) to the same container These 2 operations are what is saved as a Backstack record / transaction. Note that fragment A remains in created state, and its view is destroyed. Now popBackStack() reverses your last transaction that you’ve added to BackStack. … Read more