0

I am trying to change the white background of overflow menu in action bar I tried to assign a drawable that was generated using http://jgilfelt.github.io/android-actionbarstylegenerator/

I have defined the theme as below. But its not working and background is still white Android 4.4.2

<style name="BoxTheme" parent="android:Theme.Holo.Light">
        <!-- API 14 theme customizations can go here. -->
        <item name="android:actionBarStyle">@style/BoxActionBar</item>
    </style>
    <style name="BoxActionBar" parent="@android:style/Widget.Holo.Light.ActionBar">
            <item name="android:background">@drawable/img_actionbar</item>
             <item name="android:titleTextStyle">@style/colour.Text</item>
              <item name="android:subtitleTextStyle">@style/colour.Text</item>
              <item name="android:popupMenuStyle">@style/PopupMenu</item>
        </style>
    <style name="colour.Text" parent="@android:style/TextAppearance">
            <item name="android:textColor">@color/white</item>
        </style>
        <style name="SpinnerColor" parent="android:style/Widget.Spinner">
            <item name="android:dropDownSelector">@color/white</item>
        </style>
        <style name="PopupMenu" parent="android:style/Widget.Holo.Light.ListPopupWindow">
        <item name="android:popupBackground">@drawable/menu_dropdown_panel</item> 
    </style>
png
  • 4,368
  • 7
  • 69
  • 118
  • http://solvedstack.com/questions/how-to-change-the-background-color-of-action-bar-s-option-menu-in-android-4-2 helped . This also has step to change the text color of the menu – png Jul 01 '15 at 11:41

1 Answers1

0

Try this,

 <style name="AppTheme" parent="AppBaseTheme">
        <item name="android:popupMenuStyle">@style/MyPopupMenu</item>
        <item name="android:panelBackground">@android:color/holo_green_light</item>
        <item name="android:actionBarWidgetTheme">@style/AppTheme</item>
    </style>

    <style name ="MyPopupMenu" parent="android:Theme.Holo.Light">

        <item name="android:popupBackground">@android:color/holo_green_light</item>
    </style>

And it could look like this

enter image description here

Kartheek
  • 7,104
  • 3
  • 30
  • 44