This question has already been answered:
Or how can you dynamically respond to character input in EditText?
This question has already been answered:
Or how can you dynamically respond to character input in EditText?
To catch pressing Enter (or other keys, such as Search, Done, etc.):
editText.setOnEditorActionListener(new TextView.OnEditorActionListener() { @Override public boolean onEditorAction(TextView textView, int i, KeyEvent keyEvent) { return false; } }); To dynamically respond to user input:
editText.addTextChangedListener(new TextWatcher() { @Override public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) { } @Override public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) { } @Override public void afterTextChanged(Editable editable) { //ваши действия } }); Source: https://ru.stackoverflow.com/questions/622181/
All Articles
TextWatcher. - post_zeew