InputMethodManager mgr = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); mgr.hideSoftInputFromWindow(editTextCity.getWindowToken(), 0); //where editTextCity is a reference to View that the keyboard is being used in