[android-beginners] radiobutton gruop

2010-05-19 Thread Rc3375
Hi Everyone,
I have a RadioGroup01 with 3 buttions within that group.  My question
is, how do you detect which button(1), button(2) or button(3) was
selected by the user using the java switch statement?
Thanks to all,
Rc3375

-- 
You received this message because you are subscribed to the Google
Groups Android Beginners group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


Re: [android-beginners] radiobutton gruop

2010-05-19 Thread TreKing
On Wed, May 19, 2010 at 11:22 AM, Rc3375 rcobb3...@gmail.com wrote:

 My question is, how do you detect which button(1), button(2) or button(3)
 was selected by the user using the java switch statement?


Look at the documentation for RadioGroup. Specifically, these two:

 int 
getCheckedRadioButtonIdhttp://developer.android.com/reference/android/widget/RadioGroup.html#getCheckedRadioButtonId()
()

Returns the identifier of the selected radio button in this group.
 void 
setOnCheckedChangeListenerhttp://developer.android.com/reference/android/widget/RadioGroup.html#setOnCheckedChangeListener(android.widget.RadioGroup.OnCheckedChangeListener)
(RadioGroup.OnCheckedChangeListenerhttp://developer.android.com/reference/android/widget/RadioGroup.OnCheckedChangeListener.html
 listener)

Register a callback to be invoked when the checked radio button changes in
this group.
-
TreKing - Chicago transit tracking app for Android-powered devices
http://sites.google.com/site/rezmobileapps/treking

-- 
You received this message because you are subscribed to the Google
Groups Android Beginners group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en