title: Android ShareActionProvider with popup menu - undesired duplicate list
body: <p>Okay this is a pretty specific one: My ShareActionProvider is being used on posts in a forum. It works (apart from pesky facebook but I understand that is a well-known issue). However, when I select the share option from my pop-up menu, two lists are drawn, one on top of the other.</p>
  
  <p>How can I fix it so only one list is displayed?</p>
  
  <p>Edit: At least two other questions exist on SO referring to this problem:</p>
  
  <p><a href="https://stackoverflow.com/questions/11966542/i-use-shareactionprovider-in-popupmenu-but-show-two-popupmenu">I Use ShareActionProvider in PopupMenu, but show two PopupMenu？</a></p>
  
  <p><a href="https://stackoverflow.com/questions/20609773/call-shareactionprovider-from-a-popupmenu">Call ShareActionProvider from a PopupMenu</a></p>
  
  <p>Here is my code:
  Menu item in xml</p>
  
  <pre><code>    &lt;item
      android:id="@+id/menu_community_overflow_share"
      android:title="@string/menu_share"
      app:actionProviderClass="android.support.v7.widget.ShareActionProvider"
      android:orderInCategory="1"
      app:showAsAction="never" /&gt;
  </code></pre>
  
  <p>Java</p>
  
  <pre><code>    private void share(MenuItem item) {
      mShareActionProvider = (ShareActionProvider)MenuItemCompat.getActionProvider(item);
  
      Intent sendIntent = new Intent();
      sendIntent.setAction(Intent.ACTION_SEND);
      sendIntent.putExtra(Intent.EXTRA_TEXT, "Here's a message originally posted by " + mClickedMessage.getFirstName()
              + " " + mClickedMessage.getLastName() + ": " + mClickedMessage.getTheMessage() + "\n\n");
      sendIntent.setType("text/plain");
  
      setShareIntent(sendIntent);
  }
  
  // Call to update the share intent
  private void setShareIntent(Intent shareIntent) {
      if (mShareActionProvider != null) {
          mShareActionProvider.setShareIntent(shareIntent);
      }
  }
  </code></pre>
  
  <p>And here are some images:
  Share list is first created
  <img src="https://i.stack.imgur.com/e5XsP.png" alt="Share list is first created"></p>
  
  <p>When See All is clicked</p>
  
  <p><img src="https://i.stack.imgur.com/0WDoY.png" alt="When See All is clicked"></p>
  
  <p>When list is scrolled</p>
  
  <p><img src="https://i.stack.imgur.com/ALy0y.png" alt="When list is scrolled"></p>
  
  <p>Hopefully the problem is clear. Also note the icons cannot be clicked, doing so behaves like a click outside the list all together and kills it.</p>