title: the setAdapter method on a Spinner object - Do we always need to implement it as an extension of ArrayAdapter?
body: <p>Consider the following code, which is a simple way of defining a spinner with data from an Array backing its function:</p>
  
  <pre><code>public class HelloAndroid extends Activity implements AdapterView.OnItemSelectedListener {
      Spinner myspinner;
      ArrayAdapter&lt;String&gt; myadapter;
      final String[] sample_data={"Sankar", "Sunita", "Hari", "Susha", "Lovely"};
  
      @Override
      public void onCreate(Bundle icicle) {
          super.onCreate(icicle);
          setContentView(R.layout.main);
  
          myspinner=(Spinner)findViewById(R.id.myspinner);
          myadapter=new ArrayAdapter&lt;String&gt;(this,android.R.layout.simple_spinner_item,sample_data);
          myadapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
          myspinner.setOnItemSelectedListener(this);
          myspinner.setAdapter(myadapter);
      }
  
      public void onItemSelected(AdapterView&lt;?&gt; arg0, View arg1, int arg2, long arg3) {
          Toast.makeText(this, myadapter.getItem(arg2), Toast.LENGTH_SHORT).show();
      }
  
      public void onNothingSelected(AdapterView&lt;?&gt; arg0) {
          Toast.makeText(this, "Nothing Selected", Toast.LENGTH_SHORT).show();
      }
  }
  </code></pre>
  
  <p>My point here is that in order to implement the spinner, I am having to use an ArrayAdapter. Can't I associate the Spinner directly with an implementation of SpinnerAdapter? SpinnerAdapter does not have a setDropDownViewResource method like ArrayAdapter, so how would we set the drop down view resource that should show on the spinner? I'm am confused on how SpinnerAdapter is serving its purpose as an adapter for a Spinner when it cannot provide the two view (field and dropdown) that the spinner requires?</p>
  
  <p>Any help is appreciated.</p>