title: Cannot use onItemSelectListener() with Spinner with One Item
body: <p>So I have a spinner (spinner2 here) which is populated via an ArrayAdapter from an SQLite table. On selecting an item I want it</p>
  
  <ul>
  <li>deleted from the DB</li>
  <li>deleted from the spinner</li>
  </ul>
  
  <p>The code below actually works. Except when the spinner has only one item. When that happens
  it seems onItemSelected is not called at all.</p>
  
  <p>I get the following LogCat</p>
  
  <pre><code>10-01 22:30:55.895: WARN/InputManagerService(1143): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@45a06028
  </code></pre>
  
  <p>Oh and when two items are populating the spinner, spinner.getcount() shows two items, so it's not some strange case of the system thinking the spinner is empty or something like that.</p>
  
  <p>This is the code:</p>
  
  <pre><code>public class SpinnerItemSelectListener implements OnItemSelectedListener {
  
          public void onItemSelected(AdapterView&lt;?&gt; parent, View view, int pos, long id) {
              if(parent == spinner2){
                  if(autoselected){
                      autoselected=false;
                  }
                  else{
                      //uniqvalarray is the arraymade from pulling data from SQLite and populaitng array adapter
                      Integer i = uniquevalarray.get(pos);
                      deleteRow(i);//deletes the row from the database and repopulates the above array.
                      autoselected=true;//just a boolean to stop autoslecting in onCreate()
                      //makeAlert(i);initially wanted to make alert box.
                      loadSpinner2();//reloads the spinner with new data
  
  
                  }
  
              }
  
  
  
          }
  
          public void onNothingSelected(AdapterView parent) {
              //TODO
          }
      }
  </code></pre>