RadioGroup extendiendo RelativeLayout?
Estoy tratando de hacer una cuadrícula de botones de radio para mi aplicación, lo que he aprendido es que esto no es posible conRadioGroup
porque extiende LinearLayout y si intenta organizar laRadioButtons
usando RelativeLayout DENTRO de laRadioGroup
elRadioGroup
no ve elButtons
dentro deRelativeLayout
.
Entonces, para solucionar esto, quiero hacer un RadioGroup personalizado que extienda RelativeLayout en lugar de LinearLayout.
¿Cómo hago esto
UPDATE: hice lo que dijiste pero tengo estos errores que no sé cómo solucionar en el archivo de clase:
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