在“工具栏”菜单中更改文本的颜色

时间:2015-03-21 17:43:11

标签: android android-toolbar

我花了几个小时试图改变工具栏菜单中文本的颜色。

这个例子。我有这个工具栏:

enter image description here

我可以用

更改箭头和树点的颜色
<item name="colorControlNormal">@color/my_awesome_color</item>

我用:

更改工具栏的颜色
    <item name="colorPrimary">@color/color_primary</item>

  <!-- colorPrimaryDark is used for the status bar (with the
       battery, clock, etc). -->
  <item name="colorPrimaryDark">@color/color_primary_dark</item>

   <!-- colorAccent is used as the default value for
        colorControlActivated which is used to tint widgets. -->
  <item name="colorAccent">@color/color_accent</item>

popupmenu为app定义了一个主题:popuptheme工具栏的属性,但我不能用文本&#34;示例&#34;更改动作菜单的颜色。我怎么能这样做?

提前致谢:)

1 个答案:

答案 0 :(得分:0)

我希望我没有迟到回答这个问题。

设置

<item name="actionMenuTextColor">@color/YourColor</item> 
在styles.xml中

更改菜单项文本颜色。

我希望这有帮助。

相关问题