title: Going from 3rd to 1st fragment in the backstack: Android
body: <p>I have a sequence of event via which i have added three fragments to the backstack, one by one. Each of these fragments covers the full screen of the activity.</p>
  
  <p>I have stored the is returned from the commit of Frag1. </p>
  
  <p>Now in Frag3, based on a specific click, I want to go back to Frag1 directly and discard/pop all Fragments in between. </p>
  
  <p>So, when this button is clicked i send a message to the activity which does the following:</p>
  
  <pre><code>getSupportFragmentManager().popBackStack(mFrag1Id, FragmentManager.POP_BACK_STACK_INCLUSIVE);
  </code></pre>
  
  <p>But i just got a blank screen, so i assume no fragment was loaded. </p>
  
  <p>I even tried:
  In commit - <code>fragmentTransaction.addToBackStack("Fragment1");</code>
  and then  </p>
  
  <pre><code>getSupportFragmentManager().popBackStack("Fragment1", FragmentManager.POP_BACK_STACK_INCLUSIVE);
  </code></pre>
  
  <p>But it doesn't work. 
  Could someone please help me with this?</p>
  
  <p>Thanks.</p>