Recently I decided to change the Action Overflow Icon
on my app. I got it working on Lollipop devices, but it isn't working on my Ice Cream Sandwich and Kitkat device. Note: on both the devices that it does not work on, the action overflow icon has 3 rounded dots, so the theme is changing it to the Material version....just not my version.
My issue is that I cannot get this to work on older devices, but it works on Lollipop.
Before, I would have had to create separate themes for each version, but now that is not needed. Only one theme is recommended.
Code
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:actionOverflowButtonStyle">@style/OverflowMenuButton</item>
<item name="colorPrimary">@color/primary</item>
<item name="colorPrimaryDark">@color/primary_dark</item>
<!--<item name="colorPrimaryLight">@color/primary_light</item>-->
<item name="colorAccent">@color/accent</item>
<item name="android:textColorPrimaryInverse">@color/primary_text_light</item>
<item name="android:textColorPrimary">@color/primary_text</item>
<item name="android:textColorSecondary">@color/secondary_text</item>
<!--<item name="icons">@color/icons</item>-->
<item name="divider">@color/divider</item>
</style>
<style name="OverflowMenuButton" parent="@style/Widget.AppCompat.ActionButton.Overflow">
<item name="android:src">@drawable/ic_star_rate_white_18dp</item>
</style>
</resources>
Correct icon
Incorrect icon
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…