open input method activity window:
InputMethodManager inputMethodManager = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
// accept input text
imm.showSoftInput(submitBt,InputMethodManager.SHOW_FORCED);
close input method activity window
InputMethodManager inputMethodManager = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
inputMethodManager.hideSoftInputFromWindow(
OpeListActivity.this.getCurrentFocus().getWindowToken(),InputMethodManager.HIDE_NOT_ALWAYS);
if input method activity close open else close it
InputMethodManager m=(InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
m.toggleSoftInput(0, InputMethodManager.HIDE_NOT_ALWAYS);
get input method status
InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
boolean isOpen=imm.isActive(); isOpen if opened return true, else false
- 获取链接
- X
- 电子邮件
- 其他应用
标签:
Android
input method
- 获取链接
- X
- 电子邮件
- 其他应用
评论
发表评论