Advertisement
Guest User

Untitled

a guest
Jul 25th, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. private void escolhaCheckbox(){
  2.  
  3. if (arvorismoInfantil.isChecked()){
  4. edt_arvorismoInfantil.setEnabled(true);
  5. int valorArvorismo = Integer.valueOf(edt_arvorismoInfantil.getText().toString());
  6. int total;
  7. total = valorArvorismo * 4;
  8. Log.i("total", String.valueOf(total));
  9. }
  10. }
  11.  
  12. edt_arvorismoInfantil.setEnabled(false);
  13. escolhaCheckbox();
  14.  
  15. arvorismoInfantil.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
  16. @Override
  17. public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
  18. // aqui você habilita seu edittext usando o isChecked
  19. }
  20. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement