title: Android spinner and button
body: <p>I wanted to ask how can one use both spinner and button on the same activity. Spinner listens with its onItemListener and then the button would have an onClick listener too. So in my case, it generates an error. My scenario is that I get the selected string from the spinner and then the rest of the values from editTexts and then hit "submit" to send data to the server. But I reckon these two listeners aren't very friendly with each other?</p>
  
  <p>I set up these methods for the spinner right:</p>
  
  <pre><code>spinner.setOnItemSelectedListener(new OnItemSelectedListener() {
      @Override
      public void onItemSelected(AdapterView&lt;?&gt; parentView, View selectedItemView, int position, long id) {
          // your code here
      }
  
      @Override
      public void onNothingSelected(AdapterView&lt;?&gt; parentView) {
          // your code here
      }
  });
  </code></pre>
  
  <p>Then I need to put the onclick listener for the button:</p>
  
  <pre><code>go.setOnClickListener(new OnClickListener(){
      public void onClick(View arg0)
      {
      }
  </code></pre>
  
  <p>Where do I put this one? Before the nothingSelected method or after that?</p>