title: Android dynamically populate Drop Down List
body: <p>I would like to dynamically populate a drop down list . I would make a request to a server , get my data from there and according to my data ( for example I'll take some ids) I would like to make the list bigger/ smaller. The example that I found on developer.android was a static one , since the names in the list were written in the strings.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;resources&gt;
      &lt;string name="planet_prompt"&gt;Choose a planet&lt;/string&gt;
      &lt;string-array name="planets_array"&gt;
          &lt;item&gt;Mercury&lt;/item&gt;
          &lt;item&gt;Venus&lt;/item&gt;
          &lt;item&gt;Earth&lt;/item&gt;
          &lt;item&gt;Mars&lt;/item&gt;
          &lt;item&gt;Jupiter&lt;/item&gt;
          &lt;item&gt;Saturn&lt;/item&gt;
          &lt;item&gt;Uranus&lt;/item&gt;
          &lt;item&gt;Neptune&lt;/item&gt;
      &lt;/string-array&gt;
  &lt;/resources&gt;
  </code></pre>
  
  <p>Full code <a href="http://developer.android.com/resources/tutorials/views/hello-spinner.html" rel="nofollow">here</a>. </p>