I'm using checkbox and an edittext. When the application starts, edittext is disabled. When the user checks the box for the checkbox, the edittext field enables.
I'm having trouble enabling. I already put it on OnCreate plus 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();