I had the same problem, and its because of FrameLayout usage,
First you have to check if your fragment has already added to the activity :
String TagName = "F";
Adding a fragment without a UI If you want to get the fragment from the activity later, you need to use findFragmentByTag(). "Google"
http://developer.android.com/guide/components/fragments.html#Adding
Fragement F = getFragmentManager().findFragmentByTag(TagName);
Then check
if(F == null) {
F = new F();
getFragmentManager()
.beginTransaction()
.add(R.id.container, F, TagName)
.commit();
}
the target here is to avoid adding or creating new instance of the fragment, that persist during the configuration change which causes the problem when using the FrameLayout as container.
Solution 2 (Simple):
The only thing you have to do here is to change your container to ex:LinearLayout , and that's it. but in my opinion this is not the best solution because of multiple instances of the fragment.
Hope this help;