title: Getting the value of an item in the array
body: <p>I have the following items stored in an array-string in String.xml file </p>
  
  <pre><code>    &lt;string-array name="cr"&gt;
      &lt;item name="x"&gt; 20&lt;/item&gt;
      &lt;item name="y"&gt; 40&lt;/item&gt;
      &lt;item name="z"&gt; 60&lt;/item&gt;
      &lt;item name="k"&gt; 80&lt;/item&gt;
      &lt;item name="i"&gt; 100&lt;/item&gt;
      &lt;item name="l"&gt; 120&lt;/item&gt;
  
  &lt;/string-array&gt;
  </code></pre>
  
  <p>how can i get the value (eg 80) using the item  name in mainactivity.java file? </p>
  
  <p>int index =Arrays.asList(getResources().getStringArray(R.array.cr)).indexOf(..); I tried this but it doesn't work</p>