0

I want to change the color of the items on NavigationView. But, only wanna change each item which there are title. For example this is a part of my nav_menu

<?xml version="1.0" encoding="utf-8"?>

<group android:checkableBehavior="single">

    <item
        android:id="@+id/configuration_section"
        android:title="Title 1 of the group">

        <menu>
            <item
                android:id="@+id/itemOfGroup1"
                android:icon="@drawable/ic_map"
                android:title="@string/string1"/>
        </menu>
    </item>

    <item android:title="Title 2 of the group">
        <menu>
            <item
                android:id="@+id/itemOfGroup1"
                android:icon="@drawable/ic_action"
                android:tint="@color/blue"
                android:title="@string/string2"/>
        </menu>
    </item>

I want to put title 1 of the group and title 2 of the group in Grey color. Thanks

Faustino Gagneten
  • 2,564
  • 2
  • 28
  • 54
  • you can check this link [here](http://stackoverflow.com/questions/30594025/how-to-customize-item-background-and-item-text-color-inside-navigationview) is the sample code – Prashant Sharma Sep 13 '16 at 11:40

1 Answers1

0

you can use attribute

app:actionLayout="@layout/layout_shopping_cart_badge_button"

and in layout you set the text view with different colours.

Rashpal Singh
  • 633
  • 3
  • 13