Android常用操作

1.隐藏软键盘

InputMethodManager imm = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);
View view = this.getCurrentFocus();
if (view != null) {
//imm.showSoftInput(view, 0); // 显示软键盘
imm.hideSoftInputFromWindow(view.getWindowToken(), 0);// 隐藏软键盘
}

你可能感兴趣的:(Android常用操作)