0
I am using checkbox and edittext. When the application starts, edittext is disabled. When the user marks the checkbox, the edittext field enables.
I’m having trouble enabling. I already put in Oncreate but it does not recognize the click when I select the checkbox.
private void escolhaCheckbox(){
if (arvorismoInfantil.isChecked()){
edt_arvorismoInfantil.setEnabled(true);
int valorArvorismo = Integer.valueOf(edt_arvorismoInfantil.getText().toString());
int total;
total = valorArvorismo * 4;
Log.i("total", String.valueOf(total));
}
}
And in the method onCreate
edt_arvorismoInfantil.setEnabled(false);
escolhaCheckbox();
thank you very much, that’s right. It was right here in what I implemented .
– Flávio