Change color of overflow button

Asked

Viewed 113 times

2

I wonder how it mainly does to change the color of the overflow button, if it is not possible, change the image, to SDK minimum 10

1 answer

4


According to this answer in Soen, you can change the color of the Overflow Button thus:

<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>

Or, if you are using the ActionBarSherlock:

<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>

Yet in the same question there are other answers that may also be useful.

  • But it says that <item name="android:actionOverflowButtonStyle">@style/Mycustomtheme.Overflow</item> can only be used in API 11 or higher and need to run on API 10

  • It’s like this: <!-- Base application theme. -->&#xA; <style name="AppTheme" parent="@style/Theme.AppCompat.Light.NoActionBar">&#xA; <item name="android:actionOverflowButtonStyle">@style/OverFlow</item>&#xA; </style>

  • I found out, for api cases before 21 use <item name="actionOverflowButtonStyle">@style/MyCustomTheme.OverFlow</item>

Browser other questions tagged

You are not signed in. Login or sign up in order to post.