title: Get Random String in strings.xml
body: <p>I have strings in my Values->Strings.xml file, and when I click a button I want to show a random string from this file. My main.xml has checkboxes like this:</p>
  
  <p>For example:</p>
  
  <ul>
  <li><p>volkswagen (Checkbox)</p></li>
  <li><p>audi(Checkbox)</p></li>
  <li><p>Mercedes(Checkbox)</p></li>
  <li><p>Ford(Unchecked)</p></li>
  </ul>
  
  <p>when user clicks the 'generete a car' button, the system will get the clicked brand's array items randomly.</p>
  
  <p>The Mercedes array has c180-e250-e200-c120 etc.
  The Audi array has a1-a2-a3-a4 etc. </p>
  
  <pre><code>&lt;Button
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:text="Generate Car"
      android:id="@+id/button"
      android:layout_centerVertical="true"
      android:layout_centerHorizontal="true" /&gt;
  
  &lt;TextView
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:textAppearance="?android:attr/textAppearanceMedium"
      android:text="Butona Basın !"
      android:id="@+id/textView1"
      android:layout_alignParentTop="true"
      android:layout_centerHorizontal="true" /&gt;
  
  &lt;CheckBox
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:text="VolksWagen"
      android:id="@+id/checkBox"
      android:layout_below="@+id/textView1"
      android:layout_alignParentStart="true"
      android:checked="false" /&gt;
  
  &lt;CheckBox
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:text="Audi"
      android:id="@+id/checkBox2"
      android:layout_below="@+id/checkBox"
      android:layout_alignParentStart="true"
      android:checked="false" /&gt;
  
  &lt;CheckBox
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:text="Mercedes"
      android:id="@+id/checkBox3"
      android:layout_below="@+id/checkBox2"
      android:layout_alignParentStart="true"
      android:checked="false" /&gt;
  
  &lt;CheckBox
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:text="Ford"
      android:id="@+id/checkBox4"
      android:layout_below="@+id/checkBox3"
      android:layout_alignParentStart="true"
      android:checked="false" /&gt;
  
  &lt;TextView
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:textAppearance="?android:attr/textAppearanceMedium"
      android:text="Passat"
      android:id="@+id/textView"
      android:layout_below="@+id/checkBox4"
      android:layout_centerHorizontal="true" /&gt;
  
  &lt;TextView
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:textAppearance="?android:attr/textAppearanceMedium"
      android:text="A6"
      android:id="@+id/textView2"
      android:layout_below="@+id/textView"
      android:layout_centerHorizontal="true" /&gt;
  
  &lt;TextView
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:textAppearance="?android:attr/textAppearanceMedium"
      android:text="C180 AMG"
      android:id="@+id/textView3"
      android:layout_below="@+id/textView2"
      android:layout_centerHorizontal="true" /&gt;
  
  &lt;TextView
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:textAppearance="?android:attr/textAppearanceMedium"
      android:text="Mustang"
      android:id="@+id/textView4"
      android:layout_below="@+id/textView3"
      android:layout_alignStart="@+id/textView3" /&gt;
  
  &lt;TextView
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:textAppearance="?android:attr/textAppearanceSmall"
      android:text="Volkswagen"
      android:id="@+id/textView5"
      android:layout_above="@+id/textView2"
      android:layout_toStartOf="@+id/textView1" /&gt;
  
  &lt;TextView
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:textAppearance="?android:attr/textAppearanceSmall"
      android:text="Audi"
      android:id="@+id/textView6"
      android:layout_above="@+id/textView3"
      android:layout_alignEnd="@+id/checkBox" /&gt;
  
  &lt;TextView
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:textAppearance="?android:attr/textAppearanceSmall"
      android:text="Mercedes"
      android:id="@+id/textView7"
      android:layout_below="@+id/textView6"
      android:layout_toEndOf="@+id/checkBox4" /&gt;
  
  &lt;TextView
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:textAppearance="?android:attr/textAppearanceSmall"
      android:text="Ford"
      android:id="@+id/textView8"
      android:layout_below="@+id/textView3"
      android:layout_alignEnd="@+id/textView5" /&gt;
  </code></pre>
  
  <p>and main activity;</p>
  
  <pre><code>public class MainActivity extends Activity {
      @Override
      protected void onCreate(Bundle savedInstanceState) {
  
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
          TextView tvvolks = (TextView)findViewById(R.id.textvolks);
          TextView txaudi = (TextView)findViewById(R.id.textaudi);
          TextView txford = (TextView)findViewById(R.id.textford);
          TextView txmerc = (TextView)findViewById(R.id.textmerc);
          Button generate = (Button)findViewById(R.id.button);
          //When pressed button check to checkbox and whole actived get a random string at string.xml
  
      }
  }
  </code></pre>
  
  <p>string.xml</p>
  
  <pre><code>  &lt;string-array name="Mercedes"&gt;
      &lt;item&gt;C180&lt;/item&gt;
      &lt;item&gt;E250&lt;/item&gt;
      &lt;item&gt;etc.&lt;/item&gt;
  &lt;/string-array&gt;
  &lt;string-array name="Audi"&gt;
      &lt;item&gt;A1&lt;/item&gt;
      &lt;item&gt;A2&lt;/item&gt;
  &lt;/string-array&gt; &lt;string-array name="Ford"&gt;
  &lt;item&gt;Mustang&lt;/item&gt;
  &lt;item&gt;Fusion&lt;/item&gt;
  &lt;item&gt;Focus&lt;/item&gt;
  </code></pre>
  
  <p></p>