我怎么赶在软键盘的特定按键事件? 特别是我很感兴趣的完成键。
how do I catch specific key events from the soft keyboard? specifically I'm interested in the "Done" key.
谢谢, 大利
您捕捉的KeyEvent,然后检查其关键code。 FLAG_EDITOR_ACTION用于识别从它们一个IME的输入键已被自动标记的未来输入键下一个或完成
You catch the KeyEvent and then check its keycode. FLAG_EDITOR_ACTION is used to identify enter keys that are coming from an IME whose enter key has been auto-labelled "next" or "done"
if (event.getKeyCode() == KeyEvent.FLAG_EDITOR_ACTION)
//your code here
查找文档这里。