2017-04-09 65 views
0

https://i.stack.imgur.com/Z0UaS.png更改溢出弹出菜单项文字颜色

我无法更改溢出菜单项的文本颜色。 它使用我的主题

的textColorPrimary我在styles.xml

<item name="android:actionMenuTextColor">@color/colorPrimaryDark</item> 

将此代码添加到我的主题,但它仍然看起来是白色的。

回答

0

在款式:

<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> 
    ... 
    <item name="actionBarPopupTheme">@style/MyPopupTheme</item> 
</style> 

<style name="MyPopupTheme" parent="ThemeOverlay.AppCompat.Light"> 
    <item name="android:textColorPrimary">#ff0004</item> 
</style> 

结果:

enter image description here

+0

仍然是白色。为什么它使用我的主题的textColorPrimary? –

+0

创建一个空项目并仅执行提及的更改。测试。 – azizbekian

+0

是它的工作,但不是我的项目。可能是什么原因? –