大家好,这是Stack上的第一篇文章,所以请耐心等待。
在用户在EditText中按回车键后,我正在尝试关闭输入法。
我尝试过在layout.xml中使用android:imeOptions="actionDone"/"actionNext"
我已经在said EditText上设置了setOnEditorActionListener,并且正在寻找代码来通知IME它已经完成。
tnx。
发布于 2011-02-17 20:21:38
这个很好用
InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(myEditText.getWindowToken(), 0);https://stackoverflow.com/questions/4876011
复制相似问题