title: Android - String Array with switch statement
body: <p>I am looking for a guide as to how i can implement switch that would get values from a string array. Basically, i have a spinner with all the items as stated in my array, so i want to implement a switch so that whenever i click on an item, it will trigger an event, for example, going to another activity. </p>
  
  <pre><code>&lt;string-array name="location1"&gt;
  
      &lt;item&gt;string a&lt;/item&gt;
      &lt;item&gt;string a&lt;/item&gt;
      &lt;item&gt;string b&lt;/item&gt;
      &lt;item&gt;string c&lt;/item&gt;
      &lt;item&gt;string d&lt;/item&gt;
  
  &lt;/string-array&gt;
  </code></pre>
  
  <p>So, if i have a string array like this, how should I implement my switch statement?</p>