title: Android - addToBackStack() doesn't work?
body: <p>This is the function responsible for adding fragments to back stack:</p>
  
  <pre><code>public void populateContent(File f)
  {
  
      ContentFragment cf = new ContentFragment(ctx, ac, this);
      FragmentTransaction transaction = ac.getSupportFragmentManager().beginTransaction();;
      cf.updateView(f);
  
      transaction.replace(R.id.contentFragment, cf);
  
      transaction.addToBackStack(null);
  
      transaction.commit();
  
  }
  </code></pre>
  
  <p>When I click the back button, the last fragment doesn't get loaded (nothing happens).</p>
  
  <p>Any idea what might be causing this?</p>
  
  <p>Edit: FragmentManager log.</p>
  
  <p><a href="http://pastebin.com/mYnVdkLG">http://pastebin.com/mYnVdkLG</a></p>
  
  <p>It seems to me as if my application is saving the second view twice, instead of saving the first one and then the second view.</p>