title: Clearing specific fragments from backstack
body: <p>I have 3 fragments in my app: [a]->[b]->[c]. first fragment a is added, then it is replaced with b and then b is replaced with c. when the user is in fragment b he can go back to fragment a by pressing back button, but when in fragment c, fragments a and b must not be accessible with back button (pressing back button must close all fragments).</p>
  
  <p>I have tried using</p>
  
  <pre><code>getSupportFragmentManager().popBackStackImmediate(name, FragmentManager.POP_BACK_STACK_INCLUSIVE);
  </code></pre>
  
  <p>but it pops all fragments from the top (current fragment) to the specified fragment which is not good idea. any simple solution?!</p>