Styling is a place for improvement in my knowledge of the android platform. Given I've being trying to make a simple change all morning and been unable to achieve it.
I want to change the style of the overflow menu in the action bar. I have been able to change the background color, and add animations, so that when clicked it fades to a selected colour. But for the life of me I cannot change the text colour.
Below are two screenshots, one using the Theme.Sherlock and the other using Theme.Sherlock.Light.
Theme.Sherlock - This is my current setting which I have customised. What I want is the overflow (aka android:popupmenu) to be in the holo theme (as below), and ideally so that I can change the text colour.
Theme.Sherlock.Light - This theme shows the style of overflow menu that I want to see. However, as highlighted in red, the overflow button is the wrong colour, and this theme also draws a horizontal line.
I don't know whether it is best/easier to change Theme.Sherlock with the popup issue, or Theme.Sherlock.Light with the overflow icon and line issue. The application is of a "Light" theme so option two is probably the long term better choice, however i'll accept an answer that can solve the problem by changing either theme.
p.s. Where do you find a list of attributes for changing theme/styles, auto-complete is very incomplete in eclipse.
Update
This is actually an update for native action bars as im back to the same problem, but no longer supporting 2.3 or below.
<style name="AppTheme" parent="android:Theme.Holo.Light">
<item name="android:actionOverflowButtonStyle">@style/OverFlow</item>
</style>
<style name="OverFlow" parent="@android:style/Widget.Holo.ActionButton.Overflow">
<item name="android:src">**Insert your icon here**</item>
</style>
This answer is probably coming too late, but to those who may stumble across this question. I find it interesting that you were able to change the overflow's background color. I found that extremely difficult to figure out whereas changing the text was pretty straight forward. Just override the android:itemTextAppearance
value in your custom theme.
<item name="android:itemTextAppearance">@style/your_new_text_appearance</item>
<style name="your_new_text_appearance">
<item name="android:textColor">@color/red</item>
</style>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With