6

I have created style that change the popup menu background color and now i need to know how to change the menu item text color too. Below is the style i am using

<style name="AppTheme" parent="android:Theme.Holo">
    <item name="android:popupMenuStyle">@style/PopupMenu</item>
</style>

<style name="PopupMenu" parent="@android:style/Widget.PopupMenu">
    <item name="android:popupBackground">@color/popup_menu_bg_color</item>
</style>    
4

2 回答 2

6

将此样式代码应用于您的应用程序/活动主题样式

<item name="android:textColorPrimary">@android:color/white</item>
于 2017-09-27T09:51:37.530 回答
0

问题android 弹出菜单文本颜色可能有您需要的答案。

如果您使用 TextAppearance.AppCompat.Base.Widget.PopupMenu,则可以改用 TextAppearance.AppCompat.Light.Widget.PopupMenu。

于 2015-01-19T03:51:16.700 回答