title: Android loading string arrays programmatically
body: <p>I have a class called <code>StringsA</code> and inside it there is an array of strings: </p>
  
  <pre><code>public class StringsA {
  
  static String Names[] = {"Larry", "Moe", "Curly", "John"};  
  
  }
  </code></pre>
  
  <p>In my main class there is a <code>Button</code> and a <code>TextView</code>.
  What I want is to set the text of the <code>TextView</code> to a different word from the strings array each time the <code>Button</code> is clicked.
  For example; the current item is "Moe", when the button is clicked, the <code>TextView</code> changes to "John" (the change is random, not by order).</p>
  
  <p>My current Activity code:</p>
  
  <pre><code>    setContentView(R.layout.main);
      Button a = (Button) findViewById(R.id.button1);
      TextView b = (TextView) findViewById(R.id.tv);        
  
      Resources i = getResources();
      i.getResourceName(StringsA.Names);
  
      a.setOnClickListener(new View.OnClickListener() {
  
          public void onClick(View v) {               
  
          }
      });
  }
  </code></pre>
  
  <p>I'm getting error in <code>i.getResourceTypeName</code>. How should I change the <code>TextView</code> text to one of the strings when the <code>Button</code> is clicked?</p>