2

I've changed background of popup menu, which shows near toolbar. I used this code to change from dark background to light:

app:popupTheme="@style/ThemeOverlay.AppCompat.Light"

Here is the result:

enter image description here

But when I press menu button on device, it's shows menu with dark background and light text.

enter image description here

How can I change dark background to light and light text to dark? Or maybe there is exist a anther way. How can I show popupmenu near toolbar instead of dark menu on the bottom of app, after I pressed menu button on device?

Mehul Parmar
  • 3,599
  • 3
  • 26
  • 42
Personal Jesus
  • 1,289
  • 3
  • 11
  • 14

1 Answers1

0

Follow this link, I think this is the best solution for your requirement.

<style name="CustomActionBarTheme"
       parent="@android:style/Theme.Holo">
    <item name="android:popupMenuStyle">@style/MyPopupMenu</item>
    <item name="android:itemTextAppearance">@style/TextAppearance</item>
</style>
<!-- Popup Menu Background Color styles -->
<style name="MyPopupMenu" 
       parent="@android:style/Widget.Holo.ListPopupWindow">
    <item name="android:popupBackground">@color/Your_color_for_background</item> 
</style>
<!-- Popup Menu Text Color styles -->
<style name="TextAppearance">
    <item name="android:textColor">@color/Your_color_for_text</item>
</style>
halfer
  • 19,824
  • 17
  • 99
  • 186
RamBabu Pudari
  • 912
  • 7
  • 19