Question: setOnItemClickListener doesn't work with android Spinner. Here is my code:

```
supplier.setOnItemClickListener(new OnItemClickListener() {

                @Override
                public void onItemClick(AdapterView<?> parent, View view, int position,
                        long id) {
                    // TODO Auto-generated method stub

                    String msupplier=supplier.getSelectedItem().toString();
                    Log.e("Selected item : ",msupplier);

                }
            });

```

Answer: 
Use this 

```
supplier.setOnItemSelectedListener(new OnItemSelectedListener() {

        @Override
        public void onItemSelected(AdapterView<?> arg0, View arg1,
                int arg2, long arg3) {
            // TODO Auto-generated method stub

        }

        @Override
        public void onNothingSelected(AdapterView<?> arg0) {
            // TODO Auto-generated method stub

        }
    });

```
I think `supplier` in your code means `spinner`, do Replace this line 

```
 String msupplier=supplier.getSelectedItem().toString();

```

with the below line:

```
 String msupplier= supplier.getItemAtPosition(position).toString(); 

```