[Android入門]RadioGroupのラジオボタンの使い方

Androidコード:
m_RadioGroup = (RadioGroup) findViewById(R.id.radioGroup1);
m_RadioGroup.clearCheck();

m_RadioGroup.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {

public void onCheckedChanged(RadioGroup group, int checkedId) {
String answer = question.getAnswer();
if(m_Radiocft.getText().toString().subSequence(0, 1).equals(answer)){
m_Radiocft.setChecked(true);
str="chuming success!";
}else{
str="chuming error!";
}
m_TextViewanswer.setText(“right answer:"+answer+">>>>"+str);
}
} );

Android

Posted by arkgame