-2

I want to set the background of my popup menu like in the given image:

enter image description here

Is there any way to set this background for the given popup menu in android? If anyone have any idea please help me in accomplishing this.

kenorb
  • 155,785
  • 88
  • 678
  • 743

1 Answers1

0

you can style your pop-up menu in the xml file

Like this:

I simply change the color to #ffffff means Hex white!

    <style name="style" parent="android:Theme.Holo.Light">
    <item name="android:popupMenuStyle">...</item>
    <item name="android:popupAnimationStyle">...</item>
    <item name="android:popupBackground">#ffff</item>
    <!-- etc etc -->

Amin
  • 16
  • 3
  • Amin bro I am using the same code putting my popup background color same as i required but still it is giving the same . – Sandeep Dhiman Feb 18 '15 at 06:54
  • Did you define PopupMenu Class? – Amin Feb 18 '15 at 07:00
  • Where i have to define my PopupMenu class. What i have done i have made a popup menu xml file and put it in menu folder, and code for generating a popup menu in my Activity class and if i am putting background color in style.xml file for popupmenu its not working. – Sandeep Dhiman Feb 18 '15 at 11:48