I am adding fragment on onCreate using this code:
getSupportFragmentManager().beginTransaction().add(R.id.fragment_container, myFragment)
.addToBackStack(null).commit();
Sometimes I have to remove it on onResume using this code:
getSupportFragmentManager().beginTransaction().remove(splashFragment).commit();
getting exception: “IllegalStateException: Can not perform this action after onSaveInstanceState”