Created
July 25, 2014 18:59
-
-
Save ckashby/cb3f3bdfb5cad0936adc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
EditText etValue = (EditText) findViewById(R.id.etValue); | |
etValue.addTextChangedListener(new TextWatcher() { | |
@Override | |
public void onTextChanged(CharSequence s, int start, int before, int count) { | |
// Fires right as the text is being changed (even supplies the range of text) | |
} | |
@Override | |
public void beforeTextChanged(CharSequence s, int start, int count, | |
int after) { | |
// Fires right before text is changing | |
} | |
@Override | |
public void afterTextChanged(Editable s) { | |
// Fires right after the text has changed | |
tvDisplay.setText(s.toString()); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment