通过InputMethodManager对输入法键盘进行关闭

来源:互联网 发布:欧乐b和飞利浦知乎 编辑:程序博客网 时间:2024/06/07 02:42

1、InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
2、imm.hideSoftInputFromWindow(edit_text_username.getWindowToken(),0) ;