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. Regarding R class in application project

Hi,
      I am currently working on application in which i use a library project
as android library and refer to its functionality in my application
project.But when i try to use a resource from library it gives error ...
"R.id can not be resolved". Is it that i can not use the resouces and
layouts in library project, in app project ? What i need to do...?....
      I m currently using android 1.6 and ADT 0.9.7 that supports building a
library project.

Thanks and Regards,
Ameya

-- 

2. closing multiple activities

I have 3 activities, activityA, activityB & activityC.
I want to add a menu button NEW SEARCH that will destroy/finish all 3
and start a new activityA.
I do not want to finish the activities as they process as I want the
user to be able to navigate between the 3 unless the NEW SEARCH menu
option is chosen.

I guess basically I want to know how to finish activityB & C from
activityA.

Thanks!

-- 

3. Animasi Booting id-android - EVO+ Desir

4. Unable to start service

5. Keep accelerometer active

6. OOT-Om Dantezz in action @ICS

7. Kenapa Acer Liquid Lebih dari (Sekedar) Android? [ Acer Smart Handheld "Liquid" Competition]