显示软键盘:
protected void showInputMethod(View view) { InputMethodManager im = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); im.showSoftInput(view,InputMethodManager.SHOW_FORCED); }
隐藏软键盘:
protected void hideInputMethod() { InputMethodManager im = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); im.hideSoftInputFromInputMethod(getCurrentFocus().getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS); }未完待续。。