我正在尝试更改操作栏上溢出菜单的文本颜色,但似乎无济于事

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

最佳答案

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


以上将使文本变为红色。

10-08 06:49