InputMethodManager inputMethodManager =(InputMethodManager)activity.getApplicationContext().
getSystemService(Context.INPUT_METHOD_SERVICE);?
?
EditText editText = (EditText)findViewById(R.id.xxxx);?
inputMethodManager.hideSoftInputFromWindow(editText.getWindowToken(), 0); //隐藏