Greum
Well-Known Member
I am trying to get the value of a RadioGroup and have the following code, but I'm being told I can't set the value to true.
Java:
final Boolean isFirstTimer = false;
final Boolean isInvestor = false;
RadioGroup radioGroup = (RadioGroup) findViewById(R.id.radioGroup);
radioGroup.setOnCheckedChangeListener(
new RadioGroup.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(RadioGroup group, int checkedId) {
RadioButton rb = (RadioButton) group.findViewById(checkedId);
switch(rb.getId()) {
case R.id.radioButton2:
isFirstTimer = true;
break;
case R.id.radioButton3:
isInvestor = true;
break;
}
}
});