I am using NavigationDrawer with Fragments. Now I have 8 menu's in my navigation Drawer but I want to use tab layout in only two or 3 fragments.
I am using tab layout in a fragment whose name in the menu is department. So I am using ViewPager and PagerAdaper so do I need to write the code in Main Activity or fragmentClass.java
I was having trouble using Code Snippet on Stack Overflow so here are the gist's of my code:
Where Should I write the Java PagerAdapter and ViewPager code? I tried coding it in DepartmentFragment.java but I am not getting "getSupportFragmentManager()" in this class.
Do I need to handle each fragment in mainActivity.java ??
Use getChildFragmentManager() instead of getSupportFragmentManager().