private void hideKeyboard() {
View viewFocus = this.getCurrentFocus();
if (viewFocus != null) {
InputMethodManager imManager = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
imManager.hideSoftInputFromWindow(viewFocus.getWindowToken(), 0);
}
}
网友评论