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.
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
相关文章
- android开发 怎么把图片放入drawable的文件夹下
- android上如何获取/storage/emulated/下的文件列表
- androidStudio有个箭头不认识
- SQLite不能创建表
- Windows - Android SDK manager not listing any plat
- Animate Recycler View grid when number of columns
- Why is the app closing suddenly without showing an
- Android OverlayItem.setMarker(): Change the marker
After long search what i got the guidance to be followed like:
Add the item within the theme in the theme.xml:
Add the icon in the style in the same file I mean theme.xml:
Check out the custom icon which you want to change
It worked for me
No matter what I tried to do in
styles.xml
, none of the solutions worked for me. In the end, if you have AppCompat 23+, which you should, this is the easiest way that actually works:Change your custom overflow icon of Actionbar in styles.xml.
Put custom theme "MyTheme" in application tag of AndroidManifest.xml
Have fun.@.@
@adneal's answer is correct (so this is just a community wiki explanation to expand on it).
One of the comments suggested that there may be misunderstanding how to do this, so my answer is just another example on how to override the Overflow icon image.
Code below is based on the template styles from the ADT sample New Android Project. The code comes from the
styles.xml
file inres/values
folder.What this above code does is replace the default overflow icon with whatever drawable you have that is named
ic_menu_moreoverflow
. If you want a quick way to test it out, use your app's launcher icon filename, which will make it obvious how it works.A useful resource to use when trying to understand
ActionBar
styling, is:There you can define specific colours to use for your Overflow icon, and the ZIP file will include the correct
styles.xml
file for you.You can with a style, but you have to add it to the main Theme declaration.
You also can change it dynamically, which I go into detail about here:
Changing the Android Overflow menu icon programmatically
For those who can't get it to work try this WITHOUT the "android:" namespace.