I implemented an Activity (A
) that displays only one fragment (PF
) with getSupportFragmentManager()
.
Fragment (PF
) has one ViewPager to display 2 Fragments (F1
and F2
).
ViewPager uses FragmentPagerAdapter
with getChildFragmentManager()
.
Relative Code (ViewPagerActivity)
PF
has setRetainInstance(true)
and I added setHasOptionsMenu(true)
to PF, F1 and F2 because they have personalize optionmenus.
Everything works fine. When I swype between F1
and F2
actionbar changes showing optionmenu 1 or optionmenu 2, but when screen rotation happens optionmenus in fragments 1 and 2 are no longer called after swype.