tags:

views:

469

answers:

1

Hi All

I have a simple question - It is possible to add a menu item with an icon to a context menu ? I've searched this issue and all I found is that it is not possible, but in the Home screen of the Android device when I perform long-click a "add to home" context menu is being displayed, contains menu items with text and icon, so I figured there got to be a way of doing it.

I tried using the MenuItem.setIcon() method but the icon is not disaplyed in the context menu, only the text.

Thanks!

+3  A: 

Wherever you see icons, that's not a context menu. If it feels a bit like a context menu but has icons, that's probably an AlertDialog with a custom ListAdapter that uses rows with icons.

CommonsWare