先设置edittext的imeOptions属性 Java code ? 1 android:imeOptions= "actionDone" 然后设置edittextview的setOnEditorActionListener事件 Java code ? 1 2 3 4 5 6 7 8 edittext.setOnEditorActionListener( new OnEditorActionListener() { @Override public boolean onEditorAction(TextView v, int actionId, KeyEvent event) { if (actionId == EditorInfo.IME_ACTION_DONE) { // do something } return true ; }); ...