0

I have have a group of items in a navigation drawer menu:

<menu xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:title="Group Title">
        <menu>
            <group android:checkableBehavior="single">

                <item
                    android:id="@+id/nav_camera"
                    android:icon="@drawable/ic_star_black_24dp"
                    android:title="Import" />
                <item
                    android:id="@+id/nav_gallery"
                    android:icon="@drawable/ic_share_black_24dp"
                    android:title="Gallery" />
            </group>
        </menu>
    </item>
</menu>

I managed to style the menu items following the instruction in this post from stack overflow. Basically modifying these three properties:

This works fine except it only styles the items inside the tag:

enter image description here

So my question is: how can I style (color and background) the titles ("Show Apps" and "Others")?

Toni Joe
  • 7,715
  • 12
  • 50
  • 69

1 Answers1

0

add following codes in styles.xml

    <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
        <item name="android:itemBackground">#00F</item>
        <item name="android:itemTextAppearance">@style/TextAppearance</item>
    </style>

    <style name="TextAppearance">
        <item name="android:textColor">#F00</item>
    </style>

change first line "name" and "parent" with your app defaults