android隐藏以及显示软键盘


//隐藏软键盘   

((InputMethodManager)getSystemService(INPUT_METHOD_SERVICE)). ide

hideSoftInputFromWindow(WidgetSearchActivity.this.getCurrentFocus().getWindowToken(),  this

InputMethodManager.HIDE_NOT_ALWAYS);    spa

//显示软键盘,控件ID能够是EditText,TextView    ((InputMethodManager)getSystemService(INPUT_METHOD_SERVICE)).showSoftInput(控件ID, 0);
相关文章
相关标签/搜索