android - Set icon to the group in options menu -
i want show grouping of options in menu, , need alter standard three-lines icon own image. how can accomplish this? grouping doesn't have @icon option, unfortunately
menu.xml
<item android:icon="@drawable/settings"> <group android:menucategory="container"> <item android:id="@+id/action_mute" android:showasaction="never" android:title="@string/action_mute"/> <item android:id="@+id/action_add" android:showasaction="never" android:title="@string/action_add"/> <item android:id="@+id/action_people" android:showasaction="never" android:title="@string/action_people"/> <item android:id="@+id/action_more" android:showasaction="never" android:title="@string/action_more"/> </group> </item>
it called overflow button, if want alter need declare in style.xml located in values folder.
add in style.xml
<style name="widget.actionbutton.overflow" parent="@android:style/widget.holo.actionbutton.overflow"> <item name="android:src">@drawable/your_drawable</item> </style> after need phone call apptheme
<style name="apptheme" parent="//theme of actionbar"> <item name="android:actionoverflowbuttonstyle">@style/widget.actionbutton.overflow</item> </style> android android-optionsmenu
No comments:
Post a Comment