这是在网上看到的,不是原创,原作者不喜请联系我删除文章
亲测可用:
InputMethodManager imm = (InputMethodManager)getSystemService(INPUT_METHOD_SERVICE);//键盘
if(imm != null) {
imm.hideSoftInputFromWindow(getWindow().getDecorView().getWindowToken(),0);
}
这是在网上看到的,不是原创,原作者不喜请联系我删除文章
亲测可用:
InputMethodManager imm = (InputMethodManager)getSystemService(INPUT_METHOD_SERVICE);//键盘
if(imm != null) {
imm.hideSoftInputFromWindow(getWindow().getDecorView().getWindowToken(),0);
}