I want to change the text color of a item
that groups a menu
.
The xml is:
<?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 want to change the color of the item:
<item android:title="@string/herramientas">
This is how it is currently:
As you can see, Herramientas
comes out in black and as the background is also black as soon as you see it. I do not find any property to change it. The color of item
'My data' and 'Configuration' change it programmatically as follows from a file json
external to a server:
colorElegido = getParseColor(json.getString("colorMenuLateral"));
navigationView.setBackgroundColor(colorElegido);
colorElegido = getParseColor(json.getString("colorFuenteMenuLateral"));
ColorStateList colorList = getColorList(colorElegido);
navigationView.setItemTextColor(colorList);