In one of the activations, the keyboard opens in this way:
InputMethodManager imm = (InputMethodManager) getActivity().getSystemService(Context.INPUT_METHOD_SERVICE); imm.showSoftInput(getCurrentFocus(), InputMethodManager.SHOW_FORCED); In the onStop and onPause methods I try to close it, so that when I return to another activation, it will hide. Close this:
InputMethodManager imm = (InputMethodManager) (getSystemService(Context.INPUT_METHOD_SERVICE)); imm.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), InputMethodManager.HIDE_IMPLICIT_ONLY); But it does not close. Where is the mistake?