Android keyboard hide and show
2014-08-22 11:45
316 查看
Show
And to hide:
EditText editText = (EditText)findViewById(R.id.myEdit); InputMethodManager mgr = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE); // only will trigger it if no physical keyboard is open mgr.showSoftInput(editText,InputMethodManager.SHOW_IMPLICIT);
And to hide:
InputMethodManager mgr =(InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE); mgr.hideSoftInputFromWindow(editText.getWindowToken(), 0);
相关文章推荐
- How to resolve Android Camera Preview on Emulator show white and black square only?
- jquery插件之图片show and hide(一)
- Show and hide of div
- Part 14 ng hide and ng show in AngularJS
- android使用Fragment实现底部菜单使用show()和hide()来切换以保持Fragment状态
- How to hide and show elements based on a Content Control value change?
- Android fragment 重叠问题——通过hide,show方式导致的解决方法
- android 关闭/开启软件键盘(hideSoftKeyboard)
- cocos2d-x v3.3 Hide and Show
- [转]Android fragment 重叠问题——通过hide,show方式导致的解决方法
- jquery插件之图片show and hide(一)
- Android EditText show softKeyBoard automatically
- Virtual Keyboards on iPhone and Android
- Android Api Demos登顶之路(三十九)Fragment-->show hide
- Mac OS finder : 显示和隐藏文件[夹] show and hide files or folders
- ANDROID Porting系列八、Keymaps and Keyboard Input
- focus and keyboard hide
- Android hide the app icon but show the icon most left
- Android fragment 重叠问题——通过hide,show方式导致的解决方法
- Android fragment 重叠问题——通过hide,show方式导致的解决方法(未解决)