I ran into a similar issue when trying to restore the video player state (play or pause) and position (time elapsed) after changing the screen orientation. When I rotate the screen once, I noticed that onCreateView in the fragment activity is called twice. When it is rotated twice, onCreateView is called three time - and so on. The last call somehow forgets the states I saved in onSaveInstanceState (in the fragment activity).
Upon digging around, I found the answer I was looking for. In the activity that adds the fragment, I needed to check if savedInstanceState is null. Only if it is null should you add the fragment.
For example:
if (savedInstanceState == null) {
fragmentManager = getSupportFragmentManager();
FragmentActivity fragment = new FragmentActivity();
fragmentManager.beginTransaction()
.add(R.id.fragment_container, fragment)
.commit();
}
More information can be found here:
Android Fragment lifecycle over orientation changes