I have activity which has drawer attached to it. Each menu of the drawer is a fragment, and under one of the menu I have a fragment with TabLayout
, and each tab
I had the same architecture in my application, this how i make it :
The ViewPager used for the tabs and NestedScrollView used as FrameLayout for the other fragment, i show the ViewPager for the fragments that needs tabs and i hide the NestedScrollView in the other case.
You can find the behavior here for the NestedScrollView FixedScrollingViewBehavior