How to addd icons to actionbar menu?


#1

Is there a way to show icons as actionbar menu options? something like this?
image

Either in the menu or as action buttons (search button, for example)

Cheers,

Lildinti


#2

You can create a new action bar using Horizontal Layout, and add some labels or buttons.

As for icon, you can use font icon,


#3

how add in buttons??


#4

Just use button components


#5

Thanks for the replies but unfortunately my question still remains. If we have an action bar already, why re-invent the wheel? The Android action bar has properties to handle the icons and the overflow menu. Wouldn’t be more appropriate to expose those so we don’t need to re-invent the wheel? Should I post it in the wish list?
BTW, the menu, has option for images but they don’t show neither to the left nor right of the option text (Android Marshmallow). Is that a bug?
Again, Thanks!


#6

Friend, try this:


#7

Hi Fabio,
Thanks for your reply but it does not answer my question. I haven’t got any problem creating the option menu items and you don’t even need the extension for it (at least not if you’re using Marshmallow or up). What I’m taking about is to show the options as icon in the action bar or icons next to the option in the menu (Red circles in picture).

f178bf970675240a5bc5644409ae0a061b1363ac

@Hossein any ideas?

Cheers,

Lildinti


#8

This is the most i can do with default features of AB using horizotal layout