Skip to content

Instantly share code, notes, and snippets.

@cuber5566
Created November 20, 2014 13:37
Show Gist options
  • Save cuber5566/c60d7ccdcb8d64e5ee2b to your computer and use it in GitHub Desktop.
Save cuber5566/c60d7ccdcb8d64e5ee2b to your computer and use it in GitHub Desktop.
accountEditText.addTextChangedListener(accountTextWatcher);
...
...
...
private TextWatcher accountTextWatcher = new TextWatcher() {
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
}
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
}
@Override
public void afterTextChanged(Editable s) {
if (s.length() <= 0) {
button.setEnable(false);
} else {
button.setEnable(true);
}
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment