Keycode for Android minimizes the soft keyboard button

I am using a soft keyboard for Android 3.2. The problem is that I cannot find keyCode for the button at the bottom left, which minimizes the keyboard.

I used the switch case for onKeyDown to display keyCode and it seems the only one that has no value. I figured it would have the same code as the back button, as that is what it replaces, but there is no such luck.

+8
android android keypad
source share
1 answer

This is just a back button. You can simply do this by overriding its behavior using:

  InputMethodManager mgr = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); mgr.hideSoftInputFromWindow(editText.getWindowToken(), 0); 

and:

 @Override boolean onKeyDown(int keyCode, KeyEvent event) { //hide the soft keyboard super.onKeyDown(keyCode, event); } 
+1
source share

All Articles