Hide Soft Keyboard on Done Keypress in Android?

Changed the if-statement to if (event.getKeyCode() == KeyEvent. KEYCODE_ENTER) made it working with the xml-attribute android:inputType="phone.

Changed the if-statement to if (event.getKeyCode() == KeyEvent. KEYCODE_ENTER) made it working with the xml-attribute android:inputType="phone".

InputMethodManager inputManager = (InputMethodManager) context. GetSystemService(Context. INPUT_METHOD_SERVICE); inputManager.

ToggleSoftInput(0, 0); with context being your activity.

1 Thanx for your effort! I changed the if-statement to if (event.getKeyCode() == KeyEvent. KEYCODE_ENTER) which made it working with the xml-attribute android:inputType="phone".

I'll save your answer until next soft keyboard issue. BR - – Benny Skogberg Aug 5 '10 at 17:02.

Im struggling with the done button on the soft keyboard. I can't get the soft keyboard Done key press to hide the keyboard. From another button, it works perfectly with imm.

GetApplicationWindowToken(), 0); but the onKeyListener does not function the way I want. When I hit the editText, the soft keyboard shows up and its content is cleared from characters. Thanx for listening!

Edit: When I press key no "9" the keyboard hides.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions