Capotasto
12/2/2017 - 7:35 PM

example.java

InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
if(imm == null) { // imm might be null
  return;
}
imm.hideSoftInputFromWindow(yourEditText.getWindowToken(), 0);