How not to allow the keyboard to close when you press the back button or OK?
I tried the following action:
EditText yourEditText= (EditText) findViewById(R.id.ed); InputMethodManager imm = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE); with these options:
imm.showSoftInput(yourEditText, InputMethodManager.SHOW_IMPLICIT);imm.toggleSoftInputFromWindow( yourEditText.getApplicationWindowToken(), InputMethodManager.SHOW_FORCED, 0);imm.showSoftInput(yourEditText, InputMethodManager.SHOW_IMPLICIT);
OkandBack? Just wondering. The user did / did not do what he wanted. With these actions, he clearly indicates this. - TimurVIonBackPressed()method inonBackPressed(). - eugeneek