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. Android emulator can't get correct resulotion when viewed http://picasaweb.google.com/m/viewer?source=androidclient

Hi all:
When I created a AVD using Android SDK 1.5r1 and set its skin to HVGA-
L, I found that the default bookmark Picasa web album in Browser could
not displayed correctly. The page of Picasa was sinked to left of the
emulator's screen and the last of space is remain white. After I
rotated the emulator, I found that the webpage is bigger than my
emulator's screen width. How does this happen and how can I get a
correct resolution when I access this website?Thanks a lot!
--~--~---------~--~----~------------~-------~--~----~

2. ALSA build error for release 1.0

Hello,

I have obtained the 1.0 version of Android using
repo init -u git://android.git.kernel.org/platform/manifest.git -b
release-1.0
repo sync

I obtained the ALSA related files using
git clone git://android.git.kernel.org/platform/hardware/alsa_sound.git
git clone git://android.git.kernel.org/platform/external/alsa-lib.git
git clone git://android.git.kernel.org/platform/external/alsa-utils.git

I modified the BoardConfig.mk as required.

When I build using make, I get error below.

I am sure that the hardware_legacy itself was not available at release
1.0. But then how can I get the ALSA files relevant to 1.0? The
ALSA_sound has no tags to use to get 1.0. It does  only have branches
and getting Master branch, I get this error.

target arm C++: libaudio <= hardware/alsa_sound/AudioHardwareALSA.cpp
hardware/alsa_sound/AudioHardwareALSA.cpp:32:35: error:
hardware_legacy/power.h: No such file or directory
In file included from hardware/alsa_sound/AudioHardwareALSA.cpp:34:
hardware/alsa_sound/AudioHardwareALSA.h:21:47: error: hardware_legacy/
AudioHardwareBase.h: No such file or directory
hardware/alsa_sound/AudioHardwareALSA.h:25:31: error: hardware/
hardware.h: No such file or directory
In file included from hardware/alsa_sound/AudioHardwareALSA.cpp:34:
hardware/alsa_sound/AudioHardwareALSA.h:38: error: 'hw_device_t' does
not name a type
hardware/alsa_sound/AudioHardwareALSA.h:45: error: 'class
android::AudioSystem::audio_in_acoustics' has not been declared
hardware/alsa_sound/AudioHardwareALSA.h:153: error: expected class-
name before ',' token
hardware/alsa_sound/AudioHardwareALSA.h:197: error: expected class-
name before ',' token
hardware/alsa_sound/AudioHardwareALSA.h:201: error: 'class
android::AudioSystem::audio_in_acoustics' has not been declared
hardware/alsa_sound/AudioHardwareALSA.h:242: error:
'audio_in_acoustics' in class 'android::AudioSystem' does not name a
type
hardware/alsa_sound/AudioHardwareALSA.h:246: error: expected class-
name before '{' token
hardware/alsa_sound/AudioHardwareALSA.h:272: error: ISO C++ forbids
declaration of 'AudioStreamOut' with no type
hardware/alsa_sound/AudioHardwareALSA.h:272: error: 'AudioStreamOut'
declared as a 'virtual' field
hardware/alsa_sound/AudioHardwareALSA.h:272: error: expected ';'
before '*' token
hardware/alsa_sound/AudioHardwareALSA.h:279: error: ISO C++ forbids
declaration of 'AudioStreamIn' with no type
hardware/alsa_sound/AudioHardwareALSA.h:279: error: 'AudioStreamIn'
declared as a 'virtual' field
hardware/alsa_sound/AudioHardwareALSA.h:279: error: expected ';'
before '*' token
hardware/alsa_sound/AudioHardwareALSA.cpp:65: error: expected
constructor, destructor, or type conversion before '*' token
hardware/alsa_sound/AudioHardwareALSA.cpp:154: error:
'ROUTE_BLUETOOTH_SCO' is not a member of 'android::AudioSystem'
hardware/alsa_sound/AudioHardwareALSA.cpp:155: error:
'ROUTE_BLUETOOTH_SCO' is not a member of 'android::AudioSystem'
hardware/alsa_sound/AudioHardwareALSA.cpp:162: error:
'ROUTE_BLUETOOTH_A2DP' is not a member of 'android::AudioSystem'
hardware/alsa_sound/AudioHardwareALSA.cpp:163: error:
'ROUTE_BLUETOOTH_A2DP' is not a member of 'android::AudioSystem'
hardware/alsa_sound/AudioHardwareALSA.cpp: In constructor
'android::AudioHardwareALSA::AudioHardwareALSA()':
hardware/alsa_sound/AudioHardwareALSA.cpp:187: error: 'hw_module_t'
was not declared in this scope
hardware/alsa_sound/AudioHardwareALSA.cpp:187: error: 'module' was not
declared in this scope
hardware/alsa_sound/AudioHardwareALSA.cpp:189: error: expected `)'
before 'const'
hardware/alsa_sound/AudioHardwareALSA.cpp:189: error: expected `)'
before ';' token
hardware/alsa_sound/AudioHardwareALSA.cpp:192: error: 'hw_device_t'
was not declared in this scope
hardware/alsa_sound/AudioHardwareALSA.cpp:192: error: 'device' was not
declared in this scope
hardware/alsa_sound/AudioHardwareALSA.cpp: In destructor 'virtual
android::AudioHardwareALSA::~AudioHardwareALSA()':
hardware/alsa_sound/AudioHardwareALSA.cpp:206: error: 'struct
android::acoustic_device_t' has no member named 'common'
hardware/alsa_sound/AudioHardwareALSA.cpp:206: error: 'struct
android::acoustic_device_t' has no member named 'common'
hardware/alsa_sound/AudioHardwareALSA.cpp: At global scope:
hardware/alsa_sound/AudioHardwareALSA.cpp:234: error: expected
constructor, destructor, or type conversion before '*' token
hardware/alsa_sound/AudioHardwareALSA.cpp:1593: error: expected `}' at
end of input
make: *** [out/target/product/generic/obj/SHARED_LIBRARIES/
libaudio_intermediates/AudioHardwareALSA.o] Error 1

Thanks.
--~--~---------~--~----~------------~-------~--~----~
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

3. Phone call, recording

4. android SDK 1.5 where do i find the sqlite db file in my system

5. How can I get Activity object from Intent object or something else

6. Where is the default Calendar app on Emulator?

7. Does android provide SMP multicore support ?