10 键盘显示与隐藏
1 InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); 2 imm.toggleSoftInput(0, InputMethodManager.HIDE_NOT_ALWAYS);
1 InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); 2 if (imm.isActive()) { 3 imm.hideSoftInputFromWindow(getWindow().getDecorView() 4 .getWindowToken(), 0); 5 }