InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
if(imm != null) { imm.hideSoftInputFromWindow(getWindow().getDecorView().getWindowToken(), 0);}
InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
if(imm != null) { imm.hideSoftInputFromWindow(getWindow().getDecorView().getWindowToken(), 0);}