Skip to content

Instantly share code, notes, and snippets.

@tmaxxdd
Created June 12, 2019 10:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tmaxxdd/6df27408ddb7f3e2e32946ea8b5a7eb4 to your computer and use it in GitHub Desktop.
Save tmaxxdd/6df27408ddb7f3e2e32946ea8b5a7eb4 to your computer and use it in GitHub Desktop.
final EditText name = (EditText) v.findViewById(R.id.name);
//Create a TextWatcher and specify that this TextWatcher should be called whenever the EditText’s content changes//
name.addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
}
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
//Perform some work//
}
@Override
public void afterTextChanged(Editable s) {
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment