title: how to read items from string-array on android
body: <p>I got a problem with reading items from string-array one by one. For example, i got string-array with 10 items:</p>
  
  <pre><code>&lt;string-array name="arr"&gt;
      &lt;item&gt;First&lt;/item&gt;
      &lt;item&gt;Second&lt;/item&gt;
      &lt;item&gt;...&lt;/item&gt;
      &lt;item&gt;Tenth&lt;/item&gt;
  &lt;/string-array&gt;
  </code></pre>
  
  <p>So i know how to display items randomly, im using this code </p>
  
  <pre><code>Resources res = getResources();
  
  myString = res.getStringArray(R.array.arr);
  
  int length=myString.length;
  int index=rgenerator.nextInt(length);
  String q = myString[index];
  
  tv = (TextView) findViewById(R.id.text);
  tv.setText(q);
  </code></pre>
  
  <p>And in TextView on every button click it displays random item from array.</p>
  
  <p>Problem is, how to make display item from string-array not randomly. Like, it starts from displaying First, then on click it displays Second, and so on untill end of array.<br>
  Please help!</p>