Answer the question
In order to leave comments, you need to log in
How to set different item colors for NavigationDravable?
How to set different item colors for NavigationDravable?
Have NavigationView
<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:background="@color/colorWhite"
android:fitsSystemWindows="true"
app:headerLayout="@layout/nav_header_main"
app:itemBackground="@drawable/st_drawer_list_selector"
app:itemIconTint="@drawable/st_drawer_icon_selector"
app:itemTextColor="@drawable/st_drawer_text_selector"
app:menu="@menu/activity_main_drawer" />
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/colorIconDrawable" android:state_checked="true" />
<item android:color="@color/colorIconDrawable" android:state_enabled="false" />
<item android:color="@color/colorGreyish" android:state_enabled="false" />
</selector>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question