Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing overflow icon in the action bar

Is it possible to change the overflow icon in the action bar? I have blue icons for all ActionBar items and I also want to change the overflow icon when it appears.

like image 673
pjanecze Avatar asked Mar 16 '12 07:03

pjanecze


People also ask

Where is the action overflow menu icon?

The right-hand side of the action bar shows the actions. The action buttons (3) show the most important actions of your app. Actions that do not fit in the action bar are moved to the action overflow, and an overflow icon appears on the right.

What are action bar icons?

The ActionBar, now known as the App Bar, is a consistent navigation element that is standard throughout modern Android applications. The ActionBar can consist of: An application icon. An "upward" navigation to logical parent.

Which attribute is used to set the color of the icon of the overflow menu?

This can be achieved by setting the android:textColorSecondary theme attribute.


1 Answers

You can with a style, but you have to add it to the main Theme declaration.

<resources>     <!-- Base application theme. -->     <style name="Your.Theme" parent="@android:style/Theme.Holo">         <!-- Pointer to Overflow style ***MUST*** go here or it will not work -->         <item name="android:actionOverflowButtonStyle">@style/OverFlow</item>     </style>      <!-- Styles -->     <style name="OverFlow" parent="@android:style/Widget.Holo.ActionButton.Overflow">         <item name="android:src">@drawable/ic_action_overflow</item>     </style>  </resources> 

You also can change it dynamically, which I go into detail about here:

Changing the Android Overflow menu icon programmatically

like image 80
adneal Avatar answered Sep 22 '22 13:09

adneal