1

Lets assume that I have a bunch of fragments.

A->B->C->D....->K->L

On Fragment L, I want to return to fragment D directly by popping the fragments between these two. I assume that I need to use popBackStack(String name, int arg1) but I can't seem to understand the information that this method requires from me with the "name" parameter.

Documentation says: "If non-null, this is the name of a previous back state to look for". The name is clearly not the name of my destination fragment (e.g FragmentD). Can you please explain the usage of this method?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Alpaslan
  • 233
  • 1
  • 2
  • 11
  • hint: look at the `addToBackStack` method. – njzk2 Nov 16 '15 at 14:28
  • 1
    The answer to this question might be helpful with explaining the popBackStack-method http://stackoverflow.com/questions/5802141/is-this-the-right-way-to-clean-up-fragment-back-stack-when-leaving-a-deeply-nest – stonecompass Nov 16 '15 at 14:29

0 Answers0