Ladies and gentlemen,
First of all, please do not pose my question. If you think my question is too stupid, let me know and I will edit or delete it.
So my actual question is that I have activity ( extends Activity). In this action layout I created FrameLayoutwhere I then added four different fragments (so each of them extends Fragment. Therefore, in one of these fragments I would like to use swipeable tabs (see screenshot).
I know that this is usually done by implementing viewPager and FragmentPagerAdapter, but I cannot do it as if I were calling getSupportFragmentManagerin my fragment, it gives me an error. If I use getActivity().getFragmentManager(), it gives me an error that android.support.v4.app.fragmentmanager cannot be applied to android.app.fragmentmanager . I have to use android.support.v4.app.fragment in my fragment, because otherwise I will not be able to realize my kind of activity (described at the beginning).
Any ideas or suggestions would be greatly appreciated. screenshot
source
share