- 321 名前:デフォルトの名無しさん mailto:sage [2007/11/25(日) 11:46:13 ]
- 以下のような感じで書いてるのですがRadioButtonをグループ化できません
どうしたらグループ化することができますか? LinearLayout linearLayout = new LinearLayout(this); linearLayout.setOrientation(LinearLayout.VERTICAL); setContentView(linearLayout); radioGroup = new RadioGroup(this); LinearLayout.LayoutParams layoutParams = new RadioGroup.LayoutParams( RadioGroup.LayoutParams.WRAP_CONTENT, RadioGroup.LayoutParams.WRAP_CONTENT); radioButton1 = new RadioButton(this); radioButton1.setText("testes"); radioGroup.addView(radioButton1, layoutParams); radioButton2 = new RadioButton(this); radioButton2.setText("wwwwww"); radioGroup.addView(radioButton2, layoutParams); linearLayout.addView(radioGroup, new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT));
|

|