I'm in a situation in which I have an editText. When I press add in the edit text i'm adding a member in a list. When is added (or not) I'm opening a custom Dialog.
In my activity i have this code when clicking on add button in the edit text:
customDialogTeamMember = new CustomDialogTeamMember(............);
customDialogTeamMember.makeDialog();
editText.getText().clear();
editText.clearFocus();
hideSoftKeyboard();
My hideSoftKeyboard() is defined like:
public void hideSoftKeyboard() {
this.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
}
This method works in other sections of the app. But here is not working!
The custom dialog opens. When i close it the keyboard keeps on the screen. What could be the problem?!