Created
May 20, 2016 05:04
-
-
Save dotkebi/6cddcbb43da9f68a33221260bb9fac51 to your computer and use it in GitHub Desktop.
Android Simple TextWatcher
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
/** | |
* @author by [email protected] on 2016-05-20. | |
*/ | |
public class SimpleTextWatcher implements TextWatcher { | |
public interface AfterTextChanged { | |
void afterTextChanged(Editable s); | |
} | |
private AfterTextChanged afterTextChanged; | |
public SimpleTextWatcher(AfterTextChanged afterTextChanged) { | |
this.afterTextChanged = afterTextChanged; | |
} | |
@Override | |
public void beforeTextChanged(CharSequence s, int start, int count, int after) {} | |
@Override | |
public void onTextChanged(CharSequence s, int start, int before, int count) {} | |
@Override | |
public void afterTextChanged(Editable s) { | |
afterTextChanged.afterTextChanged(s); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment