I want to change the color of the text of an item
that groups a menu
.
The xml
file:
<?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_mi_cuenta"
android:icon="@mipmap/ic_mi_cuenta"
android:title="@string/mi_cuenta" />
</group>
<item android:title="@string/herramientas">
<menu>
<item
android:id="@+id/nav_configuracion"
android:icon="@mipmap/ic_config"
android:title="@string/configuraci_n" />
</menu>
</item>
</menu>
I wnat to change text color of:
<item android:title="@string/herramientas">
As you can see, Herramientas
comes out in black and as the background is also black it barely looks. I can not find any property to change it. The color of the item
'Mis datos' and 'Configuración' change it programmatically as follows from an external json file of a server:
colorElegido = getParseColor(json.getString("colorMenuLateral"));
navigationView.setBackgroundColor(colorElegido);
colorElegido = getParseColor(json.getString("colorFuenteMenuLateral"));
ColorStateList colorList = getColorList(colorElegido);
navigationView.setItemTextColor(colorList);