/**
? ? * 點(diǎn)擊空白區(qū)域隱藏鍵盤.
? ? */
? ? @Override
? ? public boolean onTouchEvent(MotionEvent event) {
? ? ? ? InputMethodManager imm = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);
? ? ? ? if (event.getAction() == MotionEvent.ACTION_DOWN) {
? ? ? ? ? ? if (BaseActivity.this.getCurrentFocus() != null) {
? ? ? ? ? ? ? ? if (BaseActivity.this.getCurrentFocus().getWindowToken() != null) {
? ? ? ? ? ? ? ? ? ? imm.hideSoftInputFromWindow(BaseActivity.this.getCurrentFocus().getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);
? ? ? ? ? ? ? ? }
? ? ? ? ? ? }
? ? ? ? }
? ? ? ? return super.onTouchEvent(event);
? ? }