title: How to set data in spinner from web service in android?
body: <p>I have a spinner which have data from local side, every time this activity launch a call to web service has been done, from web service i and getting a spinner id, so my question is how to set spinner value according to sector id come from web service. Please see below code when i am making spinner : </p>
  
  <pre><code>            private Spinner sp_sector;
              Collections.sort(sectors_list);
              ArrayAdapter&lt;String&gt; sector_adapter = new ArrayAdapter&lt;String&gt;(this,
                      R.layout.spinner_item, sectors_list);
              sector_adapter
                      .setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
              sp_sector.setAdapter(sector_adapter);
  </code></pre>