软键盘的操作

关闭软键盘:(hideSoftKeyboard)

void hideSoftKeyboard()
{
		if(getWindow().getAttributes().softInputMode != WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN){
			if(getCurrentFocus() != null){
				inputMethodManager.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);
			}
		}
}

猜你喜欢

转载自huanxiang0220.iteye.com/blog/2293175