I used following Code ....


Spinner sp= new Spinner(this);
                sp=(Spinner)findViewById(R.id.spinner1);

        sp.setOnItemSelectedListener(new OnItemSelectedListener() {

                        @Override
                        public void onItemSelected(AdapterView<?> items, View v,
                                        int arg2, long arg3) {
                                // TODO Auto-generated method stub
                                //v.isc
                                Log.d("RRR", Long.toString(arg2));
                        //cb=   items.getItemAtPosition(arg2).toString();
                                //Log.d("AA123", arg2);
                        }

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

                        }
                });


When i run the program, I didn't select any things from Spinner but it
consider i select one thing . How to avoid this pls help .....

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to