1
I am trying to use the isChecked() method but is giving the message "Cannot Resolve Method Ischeked(). Can anyone help me?
@Override
public View getView(int position, View convertView, ViewGroup parent) {
View view = act.getLayoutInflater().inflate(R.layout.activity_layout_lista_amc, parent, false);
final AvaliacaoMensal mensalAmc = mensal.get(position);
//pegando as referências das Views
TextView potencial = (TextView) view.findViewById(R.id.potencialLetra);
TextView questao = (TextView) view.findViewById(R.id.questao);
TextView titulo = (TextView) view.findViewById(R.id.titulo);
//populando as Views
potencial.setText(String.valueOf(mensalAmc.getPotencial()));
questao.setText(String.valueOf(mensalAmc.getQuestao()));
titulo.setText(String.valueOf(mensalAmc.getTitulo()));
RadioGroup radioGroupAmc = (RadioGroup) view.findViewById(R.id.radioGroupAmc);
flag = mensal.get(position);
radioGroupAmc.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(RadioGroup group, int checkedId) {
switch(checkedId) {
case R.id.sim:
flag.radioButtonValues[0] = group.isChecked();
// trata radioValor1
break;
case nao:
flag.radioButtonValues[1] = group.isChecked();
// trata radioValor2
break;
case na:
flag.radioButtonValues[2] = group.isChecked();
// trata radioValor3
break;
}
}
});
return view;
}
}
What do you intend to do?
– ramaral
@ramaral Save if radiobutton was selected or not
– Lucas Charles