How to implement Navigation Drawer and SlidingTabLayout together?

后端 未结 2 510
终归单人心
终归单人心 2021-01-15 23:33

I have implemented the Navigation Drawer. This is activity_nav_drawer :

    

        
2条回答
  •  爱一瞬间的悲伤
    2021-01-16 00:20

    It is a long answer but the way to do it is that use a RelativeLayout instead of FrameLayout and use the FrameLayout in the RelativeLayout.

    
    
    
    
    
    
    
    

    Here is the nice tutorial to follow with Material Design support

    How To Make Material Design Sliding Tabs

    Don't worry about ToolBar (if you are not using one) and do changes as per your need!

    Hope that will help you and let me know if you get any error! Cheers

提交回复
热议问题