I want to put a selector for the color of a text in my navigation view for itemTextColor :
navigation_view :
<android.support.design.widget.NavigationView
android:id="@+id/nav_view"
android:layout_width="225dp"
android:layout_height="match_parent"
android:layout_gravity="start"
android:background="@color/bleu"
android:fitsSystemWindows="true"
app:itemTextColor=""
app:itemBackground="@drawable/item_background"
app:headerLayout="@layout/nav_header_main"
app:menu="@menu/activity_main_drawer" />
My selector :
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:drawable="@color/bleu" />
<item android:state_focused="true" android:drawable="@color/bleu" />
<item android:state_checked="true" android:drawable="@color/bleu" />
</selector>
But I can't choose a file in res/drawable. Where put my selector? I've seen on internet in res/color/my_selector.xml but it's not working because it says me selector not allowed in an xml in res/color. And if I put my selector in res/colors.xml, I don't know how to select it from the colors.xml file.
Please tell me how to do?