I'm trying to make a grid of radio buttons for my app, what I have learned is that this isn't possible using regular RadioGroup
because it extends LinearLayout and if you try to arrange the RadioButtons
using RelativeLayout INSIDE the RadioGroup
the RadioGroup
doesn't see the Buttons
inside the RelativeLayout
.
So in order to fix this I want to make a custom RadioGroup that extends RelativeLayout instead of LinearLayout.
How do I do this?
UPDATE: I did what you said but I have these errors I don't know how to fix in the class file:
Description Resource Path Location Type
RadioGroup_checkedButton cannot be resolved or is not a field RadioGroupRelative.java /BlockBall/src/com/stickfigs/blockball line 81 Java Problem
The constructor RelativeLayout.LayoutParams(int, int, float) is undefined RadioGroupRelative.java /BlockBall/src/com/stickfigs/blockball line 265 Java Problem
The method setOnCheckedChangeWidgetListener(CompoundButton.OnCheckedChangeListener) is undefined for the type RadioButton RadioGroupRelative.java /BlockBall/src/com/stickfigs/blockball line 363 Java Problem
The method setOnCheckedChangeWidgetListener(null) is undefined for the type RadioButton RadioGroupRelative.java /BlockBall/src/com/stickfigs/blockball line 377 Java Problem
VERTICAL cannot be resolved to a variable RadioGroupRelative.java /BlockBall/src/com/stickfigs/blockball line 68 Java Problem
Widget_CompountButton_RadioButton cannot be resolved or is not a field RadioGroupRelative.java /BlockBall/src/com/stickfigs/blockball line 79 Java Problem