I have three EditText boxes in an activity, for two of which normal input methods (hard keys, default soft keyboard) are ok. But for one of the EditText boxes I want to send sof
Simple
editText.setShowSoftInputOnFocus(false);
Some people suggested that the following might work on older versions of Android, but the behaviour is unexpected.
edittextPlay.setTextIsSelectable(true);
((InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE))
.hideSoftInputFromWindow(searchBox.getWindowToken(), 0);
where SearchBox is your textbox or better yet instead of SearchBox get your current displayed window.
Or try:
InputMethodManager imm = (InputMethodManager)getBaseContext()
.getSystemService(Context.INPUT_METHOD_SERVICE);
imm.toggleSoftInput(InputMethodManager.SHOW_FORCED,InputMethodManager.HIDE_IMPLICIT_ONLY);
where context is getApplicationContext();