Skip to content

Instantly share code, notes, and snippets.

View jjTudu's full-sized avatar
🎯
Focusing

jjTudu jjTudu

🎯
Focusing
View GitHub Profile
/*hideKeyBoard(this)*/
void hideKeyBoard(Activity activity){
InputMethodManager inputManager = (InputMethodManager) activity.getSystemService(Context.INPUT_METHOD_SERVICE);
inputManager.hideSoftInputFromWindow(activity.getCurrentFocus().getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);
}