I am replacing a Fragment with another one:
FragmentTransaction transaction = mFragmentManager.beginTransaction();
transaction.setCustomAnimations(R.anim.enter, R.anim.exit, R.anim.pop_enter, R.anim.pop_exit);
transaction.replace(R.id.main_container, nextFragment, nextFragment.getClass().toString());
transaction.addToBackStack(nextFragment.getClass().toString());
transaction.commit();
however, the fragment thats being replaced, its onSaveInstanceState is not called. what am i doing wrong?