title: Android Spinner databind using array list
body: <p>I have a array list like this:</p>
  
  <pre><code>private ArrayList&lt;Locations&gt; Artist_Result = new ArrayList&lt;Location&gt;();
  </code></pre>
  
  <p>This Location class has two properties: <code>id</code> and <code>location</code>.</p>
  
  <p>I need to bind my <code>ArrayList</code> to a spinner. I have tried it this way:</p>
  
  <pre><code>Spinner s = (Spinner) findViewById(R.id.SpinnerSpcial);
  ArrayAdapter adapter = new ArrayAdapter(this,android.R.layout.simple_spinner_item, Artist_Result);
  s.setAdapter(adapter);
  </code></pre>
  
  <p>However, it shows the object's hexadecimal value. So I think I have to set display the text and value for that spinner controller.</p>