Skip to content Skip to sidebar Skip to footer

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 som

Solution 1:

You can try something like this:

<stylename="MyTheme"parent="android:style/Theme.Holo.Light"><itemname="android:actionOverflowButtonStyle">@style/MyActionButtonOverflow</item></style><stylename="MyActionButtonOverflow"parent="android:style/Widget.Holo.ActionButton.Overflow"><itemname="android:src">@drawable/my_action_bTutton_overflow</item></style>

and in AndroidManifest.xml

<applicationandroid:theme="@style/MyTheme" >

Solution 2:

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:

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

I just tested this and it works.

Solution 3:

If you are using AppCompat you can achieve by following code.

res/values/themes.xml

<stylename="MyTheme"parent="@style/Theme.AppCompat.Light"><itemname="android:actionOverflowButtonStyle">@style/ActionButtonOverflow</item><!-- Support library compatibility --><itemname="actionOverflowButtonStyle">@style/ActionButtonOverflow</item></style><stylename="ActionButtonOverflow"parent="@style/Widget.AppCompat.ActionButton.Overflow"><itemname="android:src">@drawable/ic_launcher</item></style>

and in androidmanifest.xml

<applicationandroid:theme="@style/MyTheme" >

Solution 4:

I noticed that it becomes white if the theme of the app is Holo, but it is blackish when the theme is Holo.Light

However, changing the style of the action bar to inherit from Holo and the rest of the app from Holo.Light does not solve the problem, but it should point in the direction of which style you should be modifying.

What I have tried is:

<stylename="AppThemeLight"parent="android:style/Theme.Holo.Light"><itemname="android:actionBarStyle">@style/ActionBar</item><itemname="android:windowContentOverlay">@drawable/actionbar_shadow</item></style><stylename="ActionBar"parent="android:style/Widget.Holo.Light.ActionBar"><itemname="android:background">@color/header_brown</item><itemname="android:titleTextStyle">@style/ActionBarTitle</item><itemname="android:icon">@drawable/header</item></style>

I have the same problem and I think this is close to a solution

Solution 5:

Shalafi's solution works with a few changes! You will need to specifiy theme.Holo as the parent for the theme but it has the downside of changing the default text color(at least in my styles).

The amended code should be:

<stylename="AppThemeLight"parent="android:style/Theme.Holo"><itemname="android:actionBarStyle">@style/ActionBar</item><itemname="android:windowContentOverlay">@drawable/actionbar_shadow</item></style><stylename="ActionBar"parent="android:style/Widget.Holo.Light.ActionBar"><itemname="android:background">@color/header_brown</item><itemname="android:titleTextStyle">@style/ActionBarTitle</item><itemname="android:icon">@drawable/header</item></style>

Post a Comment for "How To Change Android Overflow Menu Icon"