软键盘弹出

   
   
   
   
  1. getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE); 

软键盘消失

   
   
   
   
  1. private void mimssKeyboard(){ 
  2.         /** hidden soft keyboard **/ 
  3.         final View vv = getWindow().peekDecorView();   
  4.         if (vv != null && vv.getWindowToken() != null) {   
  5.             InputMethodManager imm = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);   
  6.             imm.hideSoftInputFromWindow(vv.getWindowToken(), 0);   
  7.         }