我正在尝试更改操作栏上溢出菜单的文本颜色,但似乎没有任何效果
<style name="Theme.MyTheme" parent="Theme.Sherlock.Light">
<item name="actionBarStyle">@style/Widget.MyTheme.ActionBar</item>
<item name="android:actionBarStyle">@style/Widget.MyTheme.ActionBar</item>
<item name="android:popupMenuStyle">@style/MyPopupMenuStyle</item>
<item name="actionBarWidgetTheme">@style/MyActionWidgetTheme</item>
<item name="android:actionMenuTextColor">@color/title</item>
</style>
<style name="MyPopupMenuStyle" parent="Widget.Sherlock.Light.ListPopupWindow">
<item name="android:textColor">@color/title</item>
<item name="android:textAppearance">@style/TextAppearance.Sherlock.Widget.PopupMenu</item>
</style>
<style name="TextAppearance.Sherlock.Widget.PopupMenu" parent="Widget">
<item name="android:textColor">@color/title</item>
答案 0 :(得分:8)
使用android:actionBarWidgetTheme
<style name="Theme.MyTheme" parent="Theme.Sherlock.Light">
<item name="actionBarStyle">@style/Widget.MyTheme.ActionBar</item>
<item name="android:actionBarStyle">@style/Widget.MyTheme.ActionBar</item>
<item name="android:actionBarWidgetTheme">@style/MyStyle</item>
<item name="actionBarWidgetTheme">@style/MyStyle</item>
</style>
<style name="MyStyle" parent="Widget">
<item name="android:textColor">#ff0000</item>
</style>
以上将使文字变为红色。
答案 1 :(得分:-2)
使用android:actionBarWidgetTheme