title: Show popup menu when action bar item is clicked
body: <p><img src="https://i.stack.imgur.com/mrO7f.png" alt="enter image description here"></p>
  
  <p>How to add a menu popup when an action bar item is clicked (see screenshot)? I want the menu item to show an icon.</p>
  
  <p>tHings I have tried:</p>
  
  <ol>
  <li><p>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.</p></li>
  <li><p>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.</p></li>
  </ol>
  
  <p>I don't understand why PopupMenu does not show any icon. I followed the "official" code as closely as possible but to no avail.</p>
  
  <p><a href="http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.0.1_r1/android/widget/ShareActionProvider.java#195" rel="noreferrer">http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.0.1_r1/android/widget/ShareActionProvider.java#195</a></p>
  
  <p>Please help!
  Thanks!</p>