Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to change Android overflow menu icon

How do i change the Overflow Menu icon on the far right of the action bar as seen in the image below? My Holo theme specifies this 3 row black stack icon by default and i want something else. i can't seem to find a solution for this. I have looked at the documentation on http://developer.android.com/guide/topics/ui/menus.html but it doesn't seem to lend much help.

Thanks!

"ActionBar"

like image 477
newdev Avatar asked Jul 22 '11 13:07

newdev


2 Answers

You can try something like this:

<style name="MyTheme" parent="android:style/Theme.Holo.Light">
     <item name="android:actionOverflowButtonStyle">@style/MyActionButtonOverflow</item>
</style>

<style name="MyActionButtonOverflow" parent="android:style/Widget.Holo.ActionButton.Overflow">
    <item name="android:src">@drawable/my_action_bTutton_overflow</item>
</style>

and in AndroidManifest.xml

<application
    android:theme="@style/MyTheme" >
like image 158
intra Avatar answered Oct 02 '22 14:10

intra


Define a custom style: for example, let's call it customoverflow.

In this style you set android:src to the picture you would like to use. Now create a style with parent Theme.holo.

In this style you need to define:

<item name="android:actionOverflowButtonStyle">@style/customoverflow</item>

I just tested this and it works.

like image 43
KarlKarlsom Avatar answered Oct 02 '22 14:10

KarlKarlsom