title: How do I create an Android Spinner as a popup?
body: <p>I want to bring up a spinner dialog when the user taps a menu item to allow the user to select an item.</p>
  
  <p>Do I need a separate dialog for this or can I use Spinner directly? I see <a href="http://developer.android.com/reference/android/widget/Spinner.html">this link,</a> mentions a MODE_DIALOG option but it doesn't seem to be defined anymore. AlertDialog may be OK but all the options say "clicking on an item in the list will not dismiss the dialog" which is what I want. Any suggestion?</p>
  
  <p>Ideally, the code would be similar to the case where the spinner is shown on the screen:</p>
  
  <pre><code>ArrayAdapter&lt;String&gt; adapter = new ArrayAdapter&lt;String&gt;(activity,
       android.R.layout.simple_spinner_item, items);              
  adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
  myspinner.setAdapter(adapter);  
  // myspinner.showAsDialog() &lt;-- what i want             
  </code></pre>