1

我正在尝试更改操作栏上溢出菜单的文本颜色,但似乎没有任何效果

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

4

2 回答 2

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>

以上将使文本变为红色。

于 2012-12-13T20:08:21.580 回答
-2

使用 android:actionBarWidgetTheme

于 2013-09-04T14:50:37.227 回答