I have an Activity
in Android, with two elements:
EditText
ListView
When my Activity
Easiest way to hide keyboard is using setSoftInputMode
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
or you can use InputMethodManager and hide keyboard like this.
InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(myEditText.getWindowToken(), 0);