title: Android getting a list of colors from resource
body: <p>I have a list of colours</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;resources&gt;
   &lt;color name="white"&gt;#FFFFFF&lt;/color&gt;
   &lt;color name="yellow"&gt;#FFFF00&lt;/color&gt;
   &lt;color name="fuchsia"&gt;#FF00FF&lt;/color&gt;
   &lt;color name="red"&gt;#FF0000&lt;/color&gt;
   &lt;color name="silver"&gt;#C0C0C0&lt;/color&gt;
   &lt;color name="gray"&gt;#808080&lt;/color&gt;
   &lt;color name="olive"&gt;#808000&lt;/color&gt;
   &lt;color name="purple"&gt;#800080&lt;/color&gt;
   &lt;color name="maroon"&gt;#800000&lt;/color&gt;
   &lt;color name="aqua"&gt;#00FFFF&lt;/color&gt;
   &lt;color name="lime"&gt;#00FF00&lt;/color&gt;
   &lt;color name="teal"&gt;#008080&lt;/color&gt;
   &lt;color name="green"&gt;#008000&lt;/color&gt;
   &lt;color name="blue"&gt;#0000FF&lt;/color&gt;
   &lt;color name="navy"&gt;#000080&lt;/color&gt;
   &lt;color name="black"&gt;#000000&lt;/color&gt;
  &lt;/resources&gt;
  </code></pre>
  
  <p>(I took this list from another question someone asked)</p>
  
  <p>What I want to do is get all the color names. I want the list so I can then populate the lot in a spinner. The pseudo code would be like this.</p>
  
  <pre><code>List ofColours = getListOfColors(R.color);
  for(int i = 0 ; i &lt; ofColours.size() ; i ++)
  {
    String colour = getResources().getColor(ofColours.get(i));
    addColourToSpinner(colour);
  } 
  </code></pre>
  
  <p>What I want is the list of colours.
  I hope that explains it Cheers for all the help</p>