[size=medium]打开软键盘:
InputMethodManager inputMethodManager = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
inputMethodManager.toggleSoftInput(0, InputMethodManager.HIDE_NOT_ALWAYS);
关闭软键盘:
inputMethodManager.hideSoftInputFromWindow(mEditText.getWindowToken(), 0);[size=medium][/size][/size]
InputMethodManager inputMethodManager = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
inputMethodManager.toggleSoftInput(0, InputMethodManager.HIDE_NOT_ALWAYS);
关闭软键盘:
inputMethodManager.hideSoftInputFromWindow(mEditText.getWindowToken(), 0);[size=medium][/size][/size]