Search code examples
androidcssandroid-actionbarandroid-themeandroid-menu

How to change action bar menu inflator icon color


I want to change the color of my menu in the action bar because very visible, but I haven't really been able to figure it out. I would like to change it to the same color as the blue underline due to action bar transparency.

Here is what I have in my styles.xml

<resources>

    <style name="AppTheme" parent="android:Theme.Holo.Light">
        <item name="android:actionBarStyle">@style/ActionBarTheme</item>
    </style>

    <style name="ActionBarTheme" parent="android:Widget.Holo.Light.ActionBar.Solid.Inverse">
        <item name="android:background">@color/cyan</item>
    </style>

</resources>

and in my themes.xml

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <!-- the theme applied to the application or activity -->
    <style name="CustomActionBarTheme"
           parent="@android:style/Theme.Holo.Light.DarkActionBar">
        <item name="android:actionBarStyle">@style/MyActionBar</item>
    </style>

    <!-- ActionBar styles -->
    <style name="MyActionBar"
           parent="@android:style/Widget.Holo.Light.ActionBar">
        <item name="android:color">@color/cyan</item>
    </style>
</resources>

How can I do that?


Solution

  • Try using the new material design theme styling! Then you can change

    • Primary color
    • Secondary color
    • Accent color
    • Text and background colors

    as specified here