This is the function responsible for adding fragments to back stack:
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();
}
When I click the back button, the last fragment doesn't get loaded (nothing happens).
Any idea what might be causing this?
Edit: FragmentManager log.
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.