title: TextView doesn't change with OnItemSelectedListener
body: <p>Simply, I have created a spinner. There is spinner entries and value of entries in my <code>array.xml</code>.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;resources&gt;
  
      &lt;string-array name="select"&gt;
          &lt;item&gt;a&lt;/item&gt;
          &lt;item&gt;b&lt;/item&gt;
          &lt;item&gt;c&lt;/item&gt;
      &lt;/string-array&gt;
  
      &lt;integer-array name="selectValues"&gt;
          &lt;item&gt;1&lt;/item&gt;
          &lt;item&gt;2&lt;/item&gt;
          &lt;item&gt;3&lt;/item&gt;
      &lt;/integer-array&gt;
  
  &lt;/resources&gt;
  </code></pre>
  
  <p>Also here is the my <code>linearlayout</code>. </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="vertical" 
      android:id="@+id/selectLayout"
      &gt;
  
      &lt;TextView
          android:id="@+id/tvSelect"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_marginTop="10dp"
          android:text="@string/select"
          android:textSize="18sp"
          android:layout_gravity="center"
           /&gt;
  
      &lt;Spinner
          android:id="@+id/sSelect"
          android:layout_width="179dp"
          android:layout_height="60dp"
          android:layout_gravity="center"
          android:entries="@array/select"
          android:prompt="@string/sec"
          android:spinnerMode="dialog"
           /&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>In my activity I have created <code>OnItemSelectedListener</code> and When an item selected by user I want to change the <code>TextView</code>. I think there is a problem when using switch.</p>
  
  <p>Here is the activity.</p>
  
  <pre><code>public class Select extends Activity implements OnItemSelectedListener{
  
      int[] itemValues;
      TextView t;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          // TODO Auto-generated method stub
          super.onCreate(savedInstanceState);
  
          Resources rsc = getResources();
          itemValues = rsc.getIntArray(R.array.selectValues);
          t = (TextView) findViewById(R.id.tvSelect);
  
          setContentView(R.layout.select);
  
          Spinner form = (Spinner) findViewById(R.id.sSelect);
          form.setOnItemSelectedListener(this);
      }
  
      @Override
      public void onItemSelected(AdapterView&lt;?&gt; item, View which, int sort,
              long arg3) {
          // TODO Auto-generated method stub
  
          switch(which.getId())
          {
          case R.id.sSelect:
              int value = itemValues[sort];
              t.setText(value);
              break;
          }
  
      }
  
      @Override
      public void onNothingSelected(AdapterView&lt;?&gt; arg0) {
          // TODO Auto-generated method stub
  
      }
  
  
  
  }
  </code></pre>
  
  <p>How to fix that?</p>
  
  <p><strong>EDIT: When I try to remove switch, I'm getting <code>unfortunately has stopped</code> error.</strong> </p>