Can't get onItemSelectedListener to fire with a Spinner?
<p>I've got an adapter that extends from BaseAdapter. I'm using it with a Spinner. I can't get an onItemSelectedListener to fire when an item is selected from it:</p>

<pre><code>public class MyAdapter extends BaseAdapter {
  ..
}

public void foo() {
    MyAdapter adapter = new MyAdapter(...);
    adapter.setStuff(new String[] { "foo0", "foo1", "fooN" });

    Spinner spinner = (Spinner)findViewById(R.id.foo);
    spinner.setOnItemSelectedListener(new OnItemSelectedListener() {
        @Override
        public void onItemSelected(AdapterView&lt;?&gt; adapterView, View view, int position, long id) {
            Log.e("####", "hello?...");
        } 

        @Override
        public void onNothingSelected(AdapterView&lt;?&gt; adapterView) {
            Log.e("####", "hello?...");
        }
    });
    spinner.setAdapter(adapter);
}
</code></pre>

<p>The spinner operates fine otherwise, I just don't receive any callbacks when I select an item. Does the callback only work with an ArrayAdapter-derived adapter?</p>

<p>Thanks</p>
