How to add a menu popup when an action bar item is clicked (see screenshot)? I want the menu item to show an icon.
tHings I have tried:
Setting actionProvider (support lib v7) for the action bar item. In the actionProvider, return null for onCreateActionView. In onPrepareSubMenu, populate the submenu. This works on Android 2.x but not Android 4.0, and for Android 2.x, there is no icon.
In the actionProvider, create a imageview and on clicking, shows a PopupMenu, but popup menu has no icon, when I have specifically used setIcon to show it.
I don't understand why PopupMenu does not show any icon. I followed the "official" code as closely as possible but to no avail.
Please help! Thanks!