create divider between header and menu in navigationview for drawerlayout -


for navigationview, can create divider between 2 items putting them in 2 groups. how can create divider between header , menu? tried make empty group @ top of menu, doesn't work.

the default theme navigationview looks quite cool, black & white style. looks quite awkward when can't create divider between header , menu (sad)

enter image description here

i don't know what's proper way it, have workaround it:

  1. as mentioned p. ilyin, can put divider on bottom of header view.

  2. you can add divider onto navigationview layout, , manually adjusting divider position.

    example:

    <android.support.design.widget.navigationview     android:id="@+id/navigation_view"     android:layout_width="wrap_content"     android:layout_height="match_parent"     android:layout_gravity="start"     app:headerlayout="@layout/drawer_menu_header"     app:menu="@menu/menu_drawer">      <view         android:layout_width="match_parent"         android:layout_height="1dp"         android:background="@color/background_gray"         android:layout_margintop="140dp"/>  </android.support.design.widget.navigationview> 

    in case, make custom gray line divider has 1dp height, , positioned under menu header (140dp height of menu header).


Comments

Popular posts from this blog

php - isset function not working properly -

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -