Thanks Mark for another speedy reply. I actually tried this. Once the radio buttons are contained within a linearlayout, they seem to stop functioning as part of my radiogroup despite the linearlayout being nested inside the radiogroup.
All of the buttons can be selected at once, and no checkchangedlistener is called when you select them.. To get around this I tried just using 2 separate radio groups, then in the checkchangedlistener method (which takes arguments of RadioGroup and a checkedID int) uncheck the radio group that wasn't selected. However, when I tried to use the arguments in this method, I got null pointer exceptions. :( On Nov 21, 6:28 pm, Mark Murphy <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > Is it possible to make 2 lines of buttons in a radio group? > > > I would like a radio group consisting of 6 buttons, in 2 rows of 3. > > That should be doable. RadioGroup behaves like a LinearLayout, and it > takes an android:orientation attribute in the layout XML. So, something > like this should work: > > <RadioGroup android:id="..." > android:orientation="vertical" > ... > > > <LinearLayout android:id="..." > android:orientation="horizontal" > ... > > > <RadioButton .../> > <RadioButton .../> > <RadioButton .../> > </LinearLayout> > <LinearLayout android:id="..." > android:orientation="horizontal" > ... > > > <RadioButton .../> > <RadioButton .../> > <RadioButton .../> > </LinearLayout> > </RadioGroup> > > Note that I haven't tried this technique, so there may be flaws in what > I've written here. Your mileage may vary. Do not use this code to > operate a nuclear plant, a heart monitor, or a nuclear-powered heart > monitor. Etc. > > -- > Mark Murphy (a Commons Guy)http://commonsware.com > > Android Training on the Ranch! -- Mar 16-20, > 2009http://www.bignerdranch.com/schedule.shtml --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~----------~----~----~----~------~----~------~--~---

