I am trying to change the color of the icon and text of the selected item in the navigation drawer. Actually I want the white icon and text when selected but it is not working as expected.
<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:layout_weight="0.9"
app:headerLayout="@layout/nav_header_main"
app:itemIconTint="@drawable/text_selector"
app:itemTextColor="@drawable/text_selector"
app:itemBackground="@drawable/nav_selector"
app:menu="@menu/activity_main_drawer"
app:theme="@style/NavigationDrawerStyle"></android.support.design.widget.NavigationView>
The nav_selector.xml file
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@color/colorAccent" android:state_checked="true" />
The text and icon selector text_selector.xml
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@color/text_color_white" android:state_checked="true" />
<item android:color="@color/black_text_color" />