I have a EditText
and button aligned to parent's bottom.
When I enter text in it and press the button to save data, the virtual keyboard does not disappear.
Can any one guide me how to hide the keyboard?
I have a EditText
and button aligned to parent's bottom.
When I enter text in it and press the button to save data, the virtual keyboard does not disappear.
Can any one guide me how to hide the keyboard?
This should work.
Just make sure that this.getCurrentFocus() does not return null, which it would if nothing has focus.
I did not see anyone using this method:
And then just request focus to the editText:
Been struggling with this for the past days and found a solution that works really well. The soft keyboard is hidden when a touch is done anywhere outside the EditText.
Code posted here: hide default keyboard on click in android
editor - is EditText field
If u have anather EditText Field, u need to watch for focus change