Alex Rivera | Logout

RadioGroup with two columns which have ten RadioButtons

Asked 2012-05-03T05:23:27.313
31

I have a RadioGroup and I want to align buttons next to each other in two columns and five rows and I am unable to achieve it. Things I have tried:

  1. RelativeLayout -> Outside RadioGroup -> Inside RadioGroup. All RadioButtons are selected, but I want only one to be selected.
  2. RadioGroup : orientation
  3. Span, stretchcolumns
  4. TableRow
  5. TableLayout

Please let me know how create one RadioGroup and have two columns and many RadioButtons within.

Edit
Report

1 Answer

9

The RadioGroup is extended from LinearLayout.

the linearlayout can not do it, so RadioGroup can not do it.

Why not implement it self.

Use RelativeLayout to layout the child view. And record the state of the child view. use setLevel to control the states.

Good luck for you!.

answered 2012-05-03T05:29:46.383

Your Answer