Just put the below code and call the function whenever u want to hide the keyboard!
private void hideKeyboard(View currentFocusView) {
if (currentFocusView instanceof EditText) {
InputMethodManager imm = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(currentFocusView.getWindowToken(), 0);
}
}
No comments :
Post a Comment