0

I am deriving my actionbar style from Holo.Light. But I want the overflow menu icon (the three dots) to be white instead of dark grey - so really I want to keep Theme.Holo.Light, but make the overflow icon use the Dark actionbar style.

This is my styles.xml file in my values-v14 folder:

# styles.xml

<style name="AppBaseTheme" parent="android:Theme.Holo.Light">
  <item name="android:actionBarStyle">@style/MyTheme.ActionBarStyle</item>
</style>

<style name="MyTheme.ActionBarStyle" parent="@android:style/Widget.Holo.Light.ActionBar">
  <item name="android:titleTextStyle">@style/MyTheme.ActionBar.TitleTextStyle</item>
  <item name="android:background">@color/my_actionbar_background_color</item>
</style>

I'm stuck as the different posts related to this don't seem to compile for me

Thanks

user3203425
  • 2,919
  • 4
  • 29
  • 48

2 Answers2

0
<style name="AppBaseTheme" parent="android:Theme.Holo.Light">
    <item name="android:actionBarStyle">@style/MyTheme.ActionBarStyle</item>
    <item name="android:actionOverflowButtonStyle">@android:style/Widget.Holo.ActionButton.Overflow</item>
</style>

<style name="MyTheme.ActionBarStyle" parent="@android:style/Widget.Holo.Light.ActionBar">
    <item name="android:titleTextStyle">@style/MyTheme.ActionBar.TitleTextStyle</item>
    <item name="android:background">@color/my_actionbar_background_color</item>
    <item name="android:actionOverflowButtonStyle">@android:style/Widget.Holo.ActionButton.Overflow</item>
    <item name="android:actionBarWidgetTheme">@android:style/Theme.Holo</item>
</style>
Yaroslav Mytkalyk
  • 16,950
  • 10
  • 72
  • 99
  • This compiles but doesn't have any effect on the overflow icon, blast! – user3203425 Feb 26 '14 at 13:28
  • Great that works. The downside is that we're relying on the assets in our apk, instead of linking to whatever system ones that theme provides - so if android changes something in the future, those assets are hard-wired? I don't get why doing actionbar stuff is so painful. – user3203425 Feb 26 '14 at 13:45
  • @user3203425 there is a Holo.Light.DarkActionBar theme. It's a strange approach you're doing using dark icon in light actionbar. You can try my previons option using @style/Widget.Holo.ActionButton.Overflow but add a declaration in AppBaseTheme (not sure if it helps) - maybe the declaration in AppBaseTheme was lacking when I first answered. – Yaroslav Mytkalyk Feb 26 '14 at 14:01
  • My understanding of the actionbar themes is lacking - could you provide the alternate solution you're suggesting with @style/Widget.Holo.ActionButton.Overflow in code? Again I basically just want the white overflow icon and the white overflow popup menu. – user3203425 Feb 26 '14 at 14:37
  • @user3203425 something tells me that I was wrong about copying the icon. Not try this answer. – Yaroslav Mytkalyk Feb 26 '14 at 15:09
  • 1
    be careful, it leads to another problem: http://stackoverflow.com/questions/10445760/how-to-change-the-default-icon-on-the-searchview-to-be-use-in-the-action-bar-on – Alécio Carvalho Oct 30 '14 at 13:24