1TextView.OnEditorActionListener editListener =
2 (TextView view, int actionId, KeyEvent event) -> {
3 if (actionId == EditorInfo.IME_ACTION_NEXT) {
4 Toast.makeText(this, "next", Toast.LENGTH_SHORT).show();
5 }
6 if (actionId == EditorInfo.IME_ACTION_DONE) {
7 Toast.makeText(this, "done", Toast.LENGTH_SHORT).show();
8 }
9 return false;
10 };
11
12editView.setOnEditorActionListener(editListener);