Android 打开输入法

如果输入法关闭则打开

InputMethodManager m=(InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);  

m.toggleSoftInput(0, InputMethodManager.HIDE_IMPLICIT_ONLY);  

关闭输入法

 

InputMethodManager inputMethodManager = (InputMethodManager)               getSystemService(Context.INPUT_METHOD_SERVICE);
inputMethodManager.hideSoftInputFromWindow(this.getCurrentFocus().getWindowToken(),
InputMethodManager.HIDE_IMPLICIT_ONLY);
searchThread.getData(string);

 

posted @ 2014-10-15 17:05  清澈见底  阅读(196)  评论(0编辑  收藏  举报