title: android spinner.setSelection(position, false); is not executed
body: <p>I have a <code>MediaPlayer</code> object and a spinner with all the songs located on the sd card.
  I'm trying to create the codes of each Play, Pause, Stop, Previous and Next buttons.</p>
  
  <p>When an item from the spinner is being selected, i'm getting the MediaPlayer from it, and set its data source and calling prepare method. Here's the code:</p>
  
  <pre><code>spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
  
          @Override
          public void onItemSelected(AdapterView&lt;?&gt; arg0, View arg1,
                  int arg2, long arg3) {
  
              Context context = getApplicationContext();
              CharSequence text = "onItemSelected";
              int duration = Toast.LENGTH_SHORT;
  
              Toast toast = Toast.makeText(context, text, duration);
              toast.show();
  
              try {
                  mediaPlayer.reset();
                  mediaPlayer.setDataSource(sdcard_playlist.get(arg2));
                  applyValuesToEqualizer();
                  mediaPlayer.prepare();
                  index = arg2;
  
  
  
              } catch (IllegalArgumentException e1) {
                  e1.printStackTrace();
              } catch (SecurityException e1) {
                  e1.printStackTrace();
              } catch (IllegalStateException e1) {
                  e1.printStackTrace();
              } catch (IOException e1) {
                  e1.printStackTrace();
              }
          }
  
          @Override
          public void onNothingSelected(AdapterView&lt;?&gt; arg0) {
          }
      });
  </code></pre>
  
  <p>And here's the code for each Stop and Next buttons:</p>
  
  <pre><code>public void stopSong(View view) {
      if (isPlaying) {
      mediaPlayer.reset();
  
      isPlaying = false;
      spinner.setSelection(index, false);  // index is the index of the chosen item from spinner
      seekbar.setProgress(0);
      } 
  }
  
  public void nextSong(View view) {
      if (isPlaying) {
          mediaPlayer.reset();
          isPlaying = false;
          spinner.setSelection(index + 1, false);
          seekbar.setProgress(0);
          playPauseSong(findViewById(R.id.pause_music_button));
      } else {
          spinner.setSelection(index + 1, false);
          seekbar.setProgress(0);
      }
  }
  </code></pre>
  
  <p>What's is happening is that when nextSong() is called, everything is working fine and the toast in onItemSelected() is shown, but when stopSong() is called, onItemSelected() is not being executed and the toast is not shown, the song is being stopped but when I click play button again, i get an exception: start called in state 1, error (-38, 0), it's because the mediaPlayer is reset and not prepared again.</p>
  
  <p>Thanks in advance :)</p>