The question title may sounds complicated but here is my situation.
I have a map fragment within an activity. Simple. turn on Storage permission to allow display of Map,
Probably a bit late, still might help out others in the future :)
You should check to see if savedInstanceState is null which is passed to onCreate(Bundle savedInstanceState). If it's null only then, launch the Fragment like so:
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_layout_file);
if (savedInstanceState == null) {
// do fragment transactions here
}
}