Code example for InputMethodManager

Methods: toggleSoftInput

0
			if (msg.what == MSG_MENU_LONG_PRESS) { 
				InputMethodManager imm = (InputMethodManager) 
					_context.getSystemService(_context.INPUT_METHOD_SERVICE); 
 
				if (imm != null) 
					imm.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0); 
			} 
		} 
	}; 
 
	// OnKeyListener 
	final public boolean onKey(View v, int keyCode, KeyEvent e) {
		final int action = e.getAction();
 
		if (e.isSystem()) {
			// filter what we handle 
			switch (keyCode) {
			case KeyEvent.KEYCODE_BACK:
			case KeyEvent.KEYCODE_MENU:
			case KeyEvent.KEYCODE_CAMERA:
			case KeyEvent.KEYCODE_SEARCH: