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

java - How to specify maven bin in eclipse maven plugin? -

single sign on - Logging into Plone site with credentials passed through HTTP -

php - Why does AJAX not process login form? -