I have a ViewPager with 3 fragments into it.
Everything works fine with two of them.
The problem is with the third pager This one is a TabHost, in which there is one fragment in each tab.
But I’ve read that it’s is not possible to put a Tabhost inside a Fragment. Nested fragments are forbidden.
Anyone has any idea of what can I do for resolving my problem?
Any alternatives?
This is what i’ve done for resolving my problem.
I’ve done one “custom” Tabhost”. I say “custom” because it is not a Tabhost, it seems to only.
In one of my fragements inside the ViewPager, i’ve 4 images on top of the fragment. And the rest of the fragment is one FrameLayout.
Each time i touch on the images, i replace the fragment which is in the frame for the respective fragemnt.
I add some code:
In the FragmentActivity:
And finally in the FragmentInViewPager (the one which contains the other 4 fragments)
I hope of have explained myself well. If anyone needs more info, just tell me.