I have this app structure:
- MainActivity with a global menu and
Fragmentcontainer. - First
Fragment: aViewPagerwith three pages. - Second
Fragment: a list
I insert the Fragments on the OnCreate() in the MainActivity and change their visibility with show and hide (using the FragmentTransaction).
When I launch the app the first Fragment appear in the screen without problem, when change to the second Fragment also work like a charm but when I come back to the first Fragment the app doesn’t show anything inside the ViewPager.
Are there any particular option that I have to change in the ViewPager to solve this?
The problem seems due to that android does not allow to have nested fragments. In my case I can manage the situation using simple views instead of fragments inside the ViewPager.