title: Fragment overlaps on activity rotation
body: <p>I'm getting really confused about this. I have an <code>actionbar</code> with list navigation. I click on the list to open 2 <code>fragment</code> one after another and display in the same activity. I'm basically replacing them using this method:</p>
  
  <pre><code>public void openFragment(AprilAppsFragment createdFragment){        
      if (createdFragment.getClass().isInstance(getDisplayedFragment()))
          return;
  
      FragmentManager manager = getSupportFragmentManager();
      FragmentTransaction transaction = manager.beginTransaction();
      transaction.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN);
  
      transaction.replace( R.id.main_fragment, createdFragment, "displayed fragment"); 
      transaction.addToBackStack(null);
      transaction.commit();  
  }
  </code></pre>
  
  <p>I open fragment <strong>A</strong>, then I open fragment <strong>B</strong>, then I rotate the screen. Fragment <strong>A</strong> is being recreated crashing my app</p>
  
  <p>Whys is that, since I'm using replace? How do I avoid recreating fragments that no longer being shown, without losing possibility of back-pressing to them?</p>