Home > DeveloperSection > Forums > Can interact with spinner items shown in dialog using onitemselectdlistener?
Ankita Pandey
Ankita Pandey

Total Post:183

Points:1285
Posted on    May-30-2013 12:01 AM

 Android Android 
Ratings:


 1 Reply(s)
 745  View(s)
Rate this:
Hi Everyone!

I have a spinner showing categories like energy,power etc in my unitsconverter application. I am using 3 spinners for categories ,units (from and to). From spinner am 

displaying items in dialog . Can interact with items without using dialoginterface.onclicklistener. If i use dialoginterface.onclicklistener on each item in dialog, i 

have implement it for all units of category for all category.It'l be very messy. So do i have any other alternate solution or can implement it in simple manner using 

dialoginterface.onclicklistener??

Thanks in advance.


AVADHESH PATEL

Total Post:604

Points:4228
Posted on    May-30-2013 5:40 AM

Hi Ankita!

You should be able to use setOnItemClickListener() on a spinner.

I hope this code might be resolve your problem. 

Don't want to miss updates? Please click the below button!

Follow MindStick