Search code examples
androidandroid-3.0-honeycombandroid-actionbarandroid-4.0-ice-cream-sandwich

Changing overflow icon in the action bar


Is it possible to change the overflow icon in the action bar? I have blue icons for all ActionBar items and I also want to change the overflow icon when it appears.


Solution

  • You can with a style, but you have to add it to the main Theme declaration.

    <resources>
        <!-- Base application theme. -->
        <style name="Your.Theme" parent="@android:style/Theme.Holo">
            <!-- Pointer to Overflow style ***MUST*** go here or it will not work -->
            <item name="android:actionOverflowButtonStyle">@style/OverFlow</item>
        </style>
    
        <!-- Styles -->
        <style name="OverFlow" parent="@android:style/Widget.Holo.ActionButton.Overflow">
            <item name="android:src">@drawable/ic_action_overflow</item>
        </style>
    
    </resources>
    

    You also can change it dynamically, which I go into detail about here:

    Changing the Android Overflow menu icon programmatically