InputMethodManagerimm=(InputMethodManager)getActivity().getSystemService(Context.);imm.hideSoftInputFromWindow(xx.getWindowToken(),);xx为EditText控件