Fixed navigation header in navigation drawer while scrolling through items

前端 未结 5 1702
傲寒
傲寒 2021-01-15 14:37

CURRENT STATE: NavigationDrawer with a NavigationHeader and NavigationMenu items. The items are large in number so scrolling is required in order to access

5条回答
  •  情书的邮戳
    2021-01-15 15:20

    Found a workaround. Definitely not the most efficient one. Please suggest if anything could be done from here.

    
    
    
    
    
      android:id="@+id/nav_view"
      android:layout_width="wrap_content"
      android:layout_height="match_parent"
      android:layout_gravity="start"
      android:fitsSystemWindows="true"
      android:background="#00000000"
      app:headerLayout="@layout/nav_header_main"
      app:menu="@menu/activity_main_drawer">
    
     
    

    Definitely works. But the header layout is redundant

提交回复
热议问题