Guest User

Untitled

a guest
Jan 21st, 2019
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. id_emp.addTextChangedListener(new TextWatcher() {
  2. @Override
  3. public void beforeTextChanged(CharSequence charSequence, int start, int i1, int i2) {
  4.  
  5. }
  6. @Override
  7. public void onTextChanged(CharSequence charSequence, int i, int before, int count) {
  8. if (count>0){ //count es cantidad de caracteres que tiene
  9. buttonOk.setEnabled(true);
  10. }else{
  11. buttonOk.setEnabled(false);
  12. }
  13. }
  14. @Override
  15. public void afterTextChanged(Editable editable) {
  16.  
  17. }
  18. });
Add Comment
Please, Sign In to add comment