title: Display Random Text From Array when Button is Pressed
body: <p>From a string array (code below), I want to randomly display one of the strings in a TextView (code below), when a button is pressed (code below). Do I have to use an onClick"sendMessage" and then a random string generator? How would I do this in Java? Many thanks!</p>
  
  <pre><code>&lt;resources&gt;
      &lt;string-array name="colorArray"&gt;
          &lt;item&gt;Green&lt;/item&gt;
          &lt;item&gt;Red&lt;/item&gt;
          &lt;item&gt;Purple&lt;/item&gt;
          &lt;item&gt;Blue&lt;/item&gt;
          &lt;item&gt;Orange&lt;/item&gt;
          &lt;item&gt;Brown&lt;/item&gt;
          &lt;item&gt;Yellow&lt;/item&gt;
          &lt;item&gt;White&lt;/item&gt;
          &lt;item&gt;Pink&lt;/item&gt;
  &lt;/resources&gt;
  
  &lt;TextView
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:text="NOT SURE WHAT TO PUT HERE"
          android:textSize="76sp"
          android:gravity="center"
          android:textAllCaps="true"/&gt;
  
  &lt;Button
          android:id="@+id/green_button"
          android:layout_width="0dp"
          android:layout_height="match_parent"
          android:layout_weight="1"
          android:background="@drawable/green_button"/&gt;
  </code></pre>