在垂直行中几乎没有编辑文本,当我按enter时,它提交字段并更改行
我想禁用它,有什么建议吗?
发布于 2022-03-19 23:20:51
试试这个:
editText.setOnEditorActionListener(new TextView.OnEditorActionListener() {
@Override
public boolean onEditorAction(TextView textView, int i, KeyEvent keyEvent) {
if (i == EditorInfo.IME_ACTION_DONE) {
//do your stuff
}
return true; //handle only by this event listener
}
});https://stackoverflow.com/questions/71541451
复制相似问题