I have an EditText in my Activity. As soon as the Activity starts I force the soft keyboard to open using.
InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
if (imm != null) {
imm.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0);
}
Now if the soft keypad is open and I press the home button, it remains open. How can I force it close on home press?
1 Answer