Search code examples
androidandroid-actionbar

Change color of the overflow button on ActionBar


Is it possible to change the color of the overflow button(3 vertical dots) on the action bar? If so, how do we do that? I didn't find any style for overflow button.

Thanks


Solution

  • You can change the image used for it using the following style declaration.

    <style name="MyCustomTheme" parent="style/Theme.Holo">
        <item name="android:actionOverflowButtonStyle">@style/MyCustomTheme.OverFlow</item>
    </style>
    
    <style name="MyCustomTheme.OverFlow">
        <item name="android:src">@drawable/my_overflow_image</item>
    </style>
    

    And if you're using ActionBarSherlock, here's how to do it

    <style name="MyCustomTheme" parent="style/Theme.Sherlock">
        <item name="android:actionOverflowButtonStyle">@style/MyCustomTheme.OverFlow</item>
        <item name="actionOverflowButtonStyle">@style/MyCustomTheme.OverFlow</item>
    </style>
    
    <style name="MyCustomTheme.OverFlow">
        <item name="android:src">@drawable/my_overflow_image</item>
    </style>