>From the below code

I am getting value of  *id* is *-1
*and throwing exception *arrayindexoutofbound

*how can I set the indexing from 0?

OnItemSelectedListener listener=new OnItemSelectedListener(){
            @Override
        public void onItemSelected(AdapterView<?> ad, View view, int
position,long arg3) {
            // TODO Auto-generated method stub

            id=ad.getId();
            Log.v("abc","id is "+id);
        }

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

        }

    };

-- 
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