public void hideSoftInput() { InputMethodManager inputMethodManager = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); inputMethodManager.hideSoftInputFromWindow( mSearchEditText.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS); }
原文:http://www.cnblogs.com/maxiaodoubao/p/4689595.html