title: Listener on a Spinner
body: <p>This code adds strings to a Spinner from a list.<br>
  How do I implement a listener so that I can get the string that is clicked or tapped from the Spinner?  </p>
  
  <pre><code>spinner = (Spinner) findViewById(R.id.spinner);
  List&lt;String&gt; list = new ArrayList&lt;String&gt;();
  
  ArrayAdapter&lt;String&gt; dataAdapter = new ArrayAdapter&lt;String&gt;(this,
              android.R.layout.simple_spinner_item, list);
      dataAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
  
      spinner.setAdapter(dataAdapter);
  </code></pre>