AlertDialog - selected item

by Ajay » Thu, 22 Apr 2010 18:58:31 GMT


Sponsored Links
 Hi,
   I have an AlertDialog with a list of selectable items and a OK
button. How can I get the selected option, when the user clicks the OK
button?

Thank you,
AJ

--



AlertDialog - selected item

by Mark Murphy » Thu, 22 Apr 2010 19:02:56 GMT


 


Try calling getListView() on the AlertDialog. From there, you should be
able to call getCheckedItemPosition().

-- 
Mark Murphy (a Commons Guy)
 http://commonsware.com  |  http://twitter.com/commonsguy 

Android Consulting:  http://commonsware.com/consulting 

--


Sponsored Links


AlertDialog - selected item

by Ajay » Thu, 22 Apr 2010 19:16:33 GMT


 Thanks a lot again for a very quick reply!! You are a life saver :-)





>



Other Threads

1. unit testing asynchronous API calls ?

Hi,

I have a suite of components that perform some asynchronous processing
and post results back to UI thread (pretty standard thing ....
utilizing AsyncTask).

Now I'm trying to come up with the unit tester (utilizing android.test
classes) that would call the components APIs, wait for result and
verify it.
Essentially I kind of need to keep the main UI loop running/looping
while waiting for result in the unit test function before exiting
it ....

I was wondering what is the best  way to accomplish this ?

Thanks,
Alex

-- 

2. Android media player not reading ID3 tags

I wonder if anyone knows whether the built in media player uses some
kind of caching of mp3 files ID3 tag information, because after I
change the tag of a file it doesn't show the updated data. Only after
the phone restart, I guess after /sdcard remount, does it show correct
tag info.
Thanks

-- 

3. Mechanism for working with new hardware after docking

4. sizing an activity window

5. Reporting bug in the Android Linux Kernel?

6. LG Ally from Verizon 2.1-update1 has broken apps

7. How to fix the Cursor Error (CursorWindow)