android - How to change divider color option menu item? -


i want change default divider color of option menu, can give me suggestion or technical?enter image description here

you can setting theme popup menu

use below code in style.xml file in res folder

 <style name="mythemepopup" parent="@android:style/theme.holo.light.darkactionbar">         <item name="android:textcolor">@color/white</item>         <item name="android:dividerheight">2px</item>         <item name="android:divider">#f00</item>         <item name="android:popupmenustyle">@style/popupmenu</item>     </style>      <style name="popupmenu" parent="@android:style/widget.popupmenu">         <item name="android:popupbackground">@color/opaque_black_color_dark</item>     </style> 

above code creating theme <item name="android:divider">#f00</item> use setting color divider

after can set created theme activity in popup menu present through manifest file

   <activity         android:name="com.android.mainactivity"         android:theme="@style/mythemepopup" /> 

hope code achieve requirement happy coding :)


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -