title: Android Fragment setRetainInstance(true) is not working on backstack
body: <p>Hi I want to keep a Fragment alive even if it is not shown anymore. Because I have some AsyncTasks going there.</p>
  
  <p>Firstly I am adding a starting point <code>Fragment</code></p>
  
  <pre><code>FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction();   
  fragmentTransaction.add(R.id.fragmentMenu, menuFragment);
  fragmentTransaction.commit();
  </code></pre>
  
  <p>Later on I replace <code>menuFragment</code> with the Fragment which should stay alive</p>
  
  <pre><code> FragmentTransaction ft = getFragmentManager().beginTransaction();
   ft.replace(R.id.fragmentMenu, btFragment).addToBackStack(null).commit();
  </code></pre>
  
  <p>Lastly I override the <code>onBackPressed()</code> method for using <code>popBackStack()</code></p>
  
  <pre><code>@Override
      public void onBackPressed() {
          if(getFragmentManager().getBackStackEntryCount() != 0){
              getFragmentManager().popBackStackImmediate();
  
          }else{
              super.onBackPressed();
          }
      }
  </code></pre>
  
  <p>Inside my <code>btFragment</code> which should stay alive even if I pop another Fragment I have set  <code>setRetainInstance(true)</code> inside the <code>onCreate()</code> method.
  But it is getting destroyed as soon as I pop the backstack.</p>
  
  <p>Am I doing something wrong? thx</p>