android 隐藏以及显示软键盘以及不自动弹出键盘的方法

<span style="font-size:18px;"><strong>1、//隐藏软键盘   
    ((InputMethodManager)getSystemService(INPUT_METHOD_SERVICE)).hideSoftInputFromWindow        (WidgetSearchActivity.this.getCurrentFocus().getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);   

 
2、//显示软键盘,控件ID可以是EditText,TextView   
    ((InputMethodManager)getSystemService(INPUT_METHOD_SERVICE)).showSoftInput(控件ID, 0); </strong></span><span id="transmark"></span>


posted on 2016-09-05 13:31  miaozhenzhong  阅读(179)  评论(0编辑  收藏  举报

导航