I am showing a keyboard with a code
((InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE)) .toggleSoftInput(InputMethodManager.SHOW_FORCED, InputMethodManager.HIDE_IMPLICIT_ONLY); etContent.requestFocus();
In the next step, I inflate the new LinearLayout and call setContentView (newLayout), and the keyboard is still there. How to force to remove the keyboard? I tried using
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
but it did not help. Can someone suggest me a solution?
Damir source share