Android PopupMenu how to change menu item text color?

Eddi picture Eddi · Jan 19, 2015 · Viewed 7.9k times · Source

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>    

Answer

Ready Android picture Ready Android · Sep 27, 2017

Apply this style code to your application/activity theme style

<item name="android:textColorPrimary">@android:color/white</item>