2017-04-09 98 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

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