NavigationView (Alterar cor do item selecionado)
Existe alguma maneira de alterar a cor do item programaticamente do item selecionado
na gaveta de navegação?
Sou capaz de usar o aplicativo: itemTextColor, mas o problema é se eu usei isso,
o item marcado no menu não será realçado.
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<group android:checkableBehavior="single">
<item
android:id="@+id/nav_home"
android:icon="@drawable/ic_home_black_24dp"
android:title="Home" />
<item
android:id="@+id/nav_search"
android:icon="@drawable/ic_search_black"
android:title="Search Location" />
<item
android:id="@+id/nav_fav"
android:icon="@drawable/ic_favorite"
android:title="Favorites" />
<item
android:id="@+id/nav_route"
android:icon="@drawable/ic_place"
android:title="Route" />
<item
android:id="@+id/nav_recent"
android:icon="@drawable/ic_nav_route"
android:title="Recent Location" />
</group>
<item android:title="Others">
<menu>
<item
android:id="@+id/nav_settings"
android:checked="true"
android:checkable="true"
android:icon="@drawable/ic_settings"
android:title="Settings" />
<item
android:id="@+id/nav_about"
android:icon="@android:drawable/ic_menu_send"
android:title="About" />
</menu>
</item>
</menu>