I\'m making an app with edittext and a button. When I enter something into edittext and then click a button, I want the keyboard and focus on edittext to disappear but I can\'t
To hide the keyboard call this:
InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow(edittext.getWindowToken(), 0);
You can also check this solution: https://stackoverflow.com/a/15587937/786337