5

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>    
Eddi
  • 379
  • 2
  • 17

2 Answers2

4

Apply this style code to your application/activity theme style

<item name="android:textColorPrimary">@android:color/white</item>
Ready Android
  • 3,070
  • 1
  • 20
  • 34
0

Question android popup menu text color might have answer which you need.

If you use TextAppearance.AppCompat.Base.Widget.PopupMenu, you might use TextAppearance.AppCompat.Light.Widget.PopupMenu instead.

Community
  • 1
  • 1
Bram Yeh
  • 56
  • 5
  • Is that means i have to change theme? I need to use Holo theme. Anyway, I have resource not found error with – Eddi Jan 19 '15 at 05:15
  • It just means you didn't use support library. – Bram Yeh Jan 20 '15 at 18:49
  • So maybe this post, http://stackoverflow.com/questions/14680728/how-to-change-menu-item-text-color-of-holo-theme-in-android would be useful. – Bram Yeh Jan 20 '15 at 19:10
  • Check https://readyandroid.wordpress.com/change-menu-item-background-color-and-text-color-android/ for menu text color and for many more https://readyandroid.wordpress.com/ – Ready Android Jan 08 '18 at 07:39