imm.isActive()一直返回true
来源:互联网 发布:java final void 编辑:程序博客网 时间:2024/04/30 03:58
InputMethodManager imm = (InputMethodManager) mActivity.getSystemService(Context.INPUT_METHOD_SERVICE); boolean isOpen = imm.isActive(mActivity.etComment);
isActive()还有个带参数的方法isActive(View view),把你的EditText的view对象传进去就OK了。
百度了一下没找到解决方法,还是看一下源码的解释。
/** * Return true if the given view is the currently active view for the * input method. */public boolean isActive(View view) { checkFocus(); synchronized (mH) { return (mServedView == view || (mServedView != null && mServedView.checkInputConnectionProxy(view))) && mCurrentTextBoxAttribute != null; }}/** * Return true if any view is currently active in the input method. */public boolean isActive() { checkFocus(); synchronized (mH) { return mServedView != null && mCurrentTextBoxAttribute != null; }}
0 0
- imm.isActive()一直返回true
- Android 软键盘的显示与隐藏(isActive一直为true的情况)
- Dialog的isShowing()方法一直返回为true
- cvCaptureFromFile一直返回NULL
- setInc一直返回0
- IMM学习
- INT Imm
- IMM cutpow
- onTouch返回true的含义
- StringUtils.isNumeric("")竟然返回true
- MemcachedClient.store 一直返回false?
- rest返回一直为404
- js中 [] ? true : false 的返回值为什么是true?
- struts2+jquery+json返回true列子
- CheckBox控件返回"true,false"的问题
- android onKeyDown返回true与false区别
- ListView设置OnTouchListener返回true会怎样
- String类型的Hello返回 true | false
- 搬家通知博文
- 面向对象
- [心得]CentOS优雅后台运行的几种姿势
- 17、责任链模式(Chain of Responsibility)
- 剪枝+再训练:稀疏化DeepID2
- imm.isActive()一直返回true
- Unity高频面试题总结
- Hive 基础之:分区、桶、Sort Merge Bucket Join
- 腾讯云点播步骤
- sql server游标使用示例
- MySQL Workbench “Error Code: 1175” 的解决方法
- 导入项目jdk不匹配的问题
- 面向对象设计原则 面向对象设计原则概述
- VSAN底层架构细节