如题!先谢了!
解决方案 »
- 如何让一个圆围绕轴心转一定的角度
- 关于用Eclipse搭建Android平台的问题-错误提示PANIC: Could not open
- 跳转到相应应用不成功
- opencore如何编译生成.so库
- 如何用多线程实现网络读取天气信息
- MediaPlayer播放系统ALARM铃音
- 关于Spinner的问题
- 想要在代码里获得apk版本号..怎么样脱离Activity, Service或者BroadcastReceiver等取得PackageManager
- 如果用代码关闭自带的浏览器?
- android程序按下home键后,再回到应用就崩掉了,求解
- 获取当前位置时 如果wifi和gps同时打开就获取不到
- android应用资源文件上有红叉,请问如何解决此类问题?
private boolean CheckKeyBoard()
{
InputMethodManager m = (InputMethodManager)
CenterText.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
return m.isActive();
}
为什么每次都是返回true,我把虚拟键盘按下去后还是返回true,为什么呀?
* Return true if any view is currently active in the input method.
*/
public boolean isActive() {
checkFocus();
synchronized (mH) {
return mServedView != null && mCurrentTextBoxAttribute != null;
}
}这是InputMethodManager, isActive方法的源码,从注释就可以观察到,这不是用来判断是否虚拟键盘中是否有键按下。