android软键盘问题

  1. //隐藏软键盘 ((InputMethodManager)getSystemService(INPUT_METHOD_SERVICE)).hideSoftInputFromWindow(WidgetSearchActivity.this.getCurrentFocus().getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS); //显示软键盘,控件ID能够是EditText,TextView ((InputMethodManager)getSystemService(INPUT_METHOD_SERVICE)).showSoftInput(控件ID, 0); 
   if (imm.isActive()) {   //若是开启与关闭互换           imm.toggleSoftInput(InputMethodManager.SHOW_IMPLICIT,InputMethodManager.HIDE_NOT_ALWAYS);    }//关闭软键盘,开启方法相同,这个方法是切换开启与关闭状态的
相关文章
相关标签/搜索