Sunday 15 July 2012

android - How to set the background color of the overflow menu -



android - How to set the background color of the overflow menu -

i trying set background drawable/color of overflow menu dynamically in code , have found answers here don't work android 4.x. have solution or ideas on how this?

if remember correctly, found many solutions before none of them working 4.4. had alter define custom theme , utilize next in style mentioned on this reply on how alter background color of action bar's alternative menu in android 4.2? question. sniplet below there. @jonik. :

<style name="myappactionbartheme" parent="android:theme.holo.light"> <item name="android:popupmenustyle">@style/myapp.popupmenu</item> <item name="android:actionbarstyle">@style/myapp.actionbar</item> </style> <!-- beef: background color action bar overflow menu --> <style name="myapp.popupmenu" parent="android:widget.holo.light.listpopupwindow"> <item name="android:popupbackground">@drawable/menu_dropdown_panel</item> </style>

also remember somehow didn't work if instead of parent="android:theme.holo.light", used parent= "android:theme.holo.light.darkactionbar". create sure using appropriate parent theme.

let me know if helped.

android menu colors background overflow

No comments:

Post a Comment