1、今天看到自己原来写的代码有隐藏软键盘功能,今天写一下就当记录了。
View showview = getWindow().peekDecorView();
if (showview != null) {
InputMethodManager inputmanger = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
inputmanger.hideSoftInputFromWindow(showview.getWindowToken(), 0);
}