机器人的WebView软糖 - >不应该发生:没有发现矩形为基础的测试节点 [英] Android WebView JellyBean -> Should not happen: no rect-based-test nodes found

查看:131
本文介绍了机器人的WebView软糖 - >不应该发生:没有发现矩形为基础的测试节点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序使用了很多webviews它正躺在片段,其持有一家ViewPager的。

My application is using a lot of webviews which are lying in fragments which are hold by a ViewPager.

每当我通过我的Galaxy Nexus的应用程序与杰利贝恩刷卡就可以了我一次又一次地得到如下控制台消息:

Whenever i swipe through the app on my Galaxy Nexus with Jellybean on it i get the following console message again and again:

08-23 13:44:03.374: E/webcoreglue(21690): Should not happen: no rect-based-test nodes found

谁能给我解释一下是怎么回事错在这里,这样我也许能解决这个问题?

Can anyone explain to me what is going wrong here so that i might be able to fix the issue?

推荐答案

出现的问题是因为在某些情况下的WebView没有注意到它的可见矩形改变了,所以就WebKit是有关的页面仍然不可见。因此,所有的触摸落在窗外,和被拒绝。

The issue occurs because in some scenarios WebView fails to notice that its visible rect has changed, so as far as webkit is concerned the page is still not visible. Thus all touches fall outside of the window, and get rejected.

最简洁的解决方法是,当你知道你的WebView的知名度已改变(如响应来自viewpager一个setPrimaryItem回调),调​​用 webview.onScrollChanged(webview.getScrollX(),web视图。 getScrollY());

The cleanest fix is when you know the visibility of your WebView has changed (such as in response to a setPrimaryItem callback from a viewpager), call webview.onScrollChanged(webview.getScrollX(), webview.getScrollY());

您将需要继承web视图,以促进保护onScrollChanged到一个公共的方法。

You will need to subclass the webview to promote the protected onScrollChanged to a public method.

这篇关于机器人的WebView软糖 - >不应该发生:没有发现矩形为基础的测试节点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆