0

This is the code i have written to get the navigation drawer using android.support.design.widget.NavigationView`

<include layout="@layout/app_bar_main"
    android:layout_width="match_parent"
    android:layout_height="match_parent" />

<android.support.design.widget.NavigationView
    android:id="@+id/nav_view"
    android:layout_width="wrap_content"
    android:layout_height="match_parent"
    android:layout_gravity="start"
    android:fitsSystemWindows="true"
    android:elevation="16dp"
    app:menu="@menu/activity_main_drawer" />

` and the menu i used to inflate is this where the color of the icon is blue in color.

but after inflating to the NavigationView It comes with different color as this

Please help me solving it.

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Arnold Laishram
  • 1,801
  • 2
  • 18
  • 25

1 Answers1

1

First use Updated support lib version "v7:23.1.1"

 <android.support.design.widget.NavigationView
    android:id="@+id/navigation_view"
    android:layout_height="match_parent"
    android:layout_width="wrap_content"
    android:textAlignment="2"
    android:fitsSystemWindows="true"
    android:layout_gravity="start"
    android:textAppearance="?attr/menu"
    app:headerLayout="@layout/header"
    android:elevation="10dp"
    app:itemIconTint="#FF00E5FF"
    app:menu="@menu/drawer_view"
    />

itemIconTint set the color for icon ,if you want do not set color then use

app:itemIconTint="#00000000"

Akash Jagtap
  • 404
  • 2
  • 8