废话不多说,直接上代码了..InputMethodManager inputMethodManager =(InputMethodManager)activity.getApplicationContext(). getSystemService(Context.INPUT_METHOD_SERVICE); EditText editText = (EditText)findViewById(R.id.xxxx); inputMethodManager.hideSoftInputFromWindow(editText.getWindowToken(), 0); //隐藏
废话不多说,直接上代码了..