Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I believe that specific example is a <a href="http://developer.android.com/reference/android/widget/ShareActionProvider.html" rel="nofollow"><code>ShareActionProvider</code></a>, which is a special sublcass of <code>ActionProvider</code></p> <p>If you are adding an <code>ActionProvider</code> in the xml for your menu you can treat it as a menu item and add the icon. </p> <p>From <a href="http://developer.android.com/reference/android/view/ActionProvider.html" rel="nofollow"><code>ActionProvider</code></a> documentation:</p> <pre><code>&lt;item android:id="@+id/my_menu_item" android:title="Title" android:icon="@drawable/my_menu_item_icon" android:showAsAction="ifRoom" android:actionProviderClass="foo.bar.SomeActionProvider" /&gt; </code></pre> <p>Since I haven't used these I don't know enough to know if all <code>ActionProvider</code>s have the spinner corner triangle... my guess is yes?</p> <p><strong>UPADTE:</strong></p> <p>I was just thinking about how <code>SpinnerAdapter</code> works and there is another way to do this. If you are using a custom subclass of <code>SpinnerAdapter</code> in your <code>Spinner</code> it will have 2 methods and you could do the following:</p> <pre><code>@Override public View getDropDownView(int position, View convertView, ViewGroup parent) { // return the view to display when you are looking at the dropdown, // so this will probably be a TextView and/or an ImageView } @Override public View getView(int position, View convertView, ViewGroup parent) { // This will show when the item at the provided position is // selected. At this point you could return the ImageView you want to // always appear at the top, such as the share icon. } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload