📅  最后修改于: 2022-03-11 14:52:09.433000             🧑  作者: Mango
TextView.OnEditorActionListener editListener =
(TextView view, int actionId, KeyEvent event) -> {
if (actionId == EditorInfo.IME_ACTION_NEXT) {
Toast.makeText(this, "next", Toast.LENGTH_SHORT).show();
}
if (actionId == EditorInfo.IME_ACTION_DONE) {
Toast.makeText(this, "done", Toast.LENGTH_SHORT).show();
}
return false;
};
editView.setOnEditorActionListener(editListener);