私は自分のアプリのラジオボタンのグリッドを作成しようとしていますが、RadioGroup
LinearLayoutを拡張するため、通常の使用ではこれが不可能であり、 RadioButtons
RelativeLayoutを内部に配置しようとすると、内部が表示さRadioGroup
れRadioGroup
ないことを学びました。 。Buttons
_RelativeLayout
したがって、これを修正するために、LinearLayoutの代わりにRelativeLayoutを拡張するカスタムRadioGroupを作成したいと思います。
どうすればよいですか?
更新:私はあなたが言ったことをしましたが、クラスファイルで修正する方法がわからないこれらのエラーがあります:
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