webview : Should not happen: no rect-based-test nodes found

来源:互联网 发布:查快递软件 编辑:程序博客网 时间:2024/05/23 01:12

viewpager中嵌套webview ,除第一个webview外,其他webview的touch事件必须滚动后才能响应,并出现错误:Should not happen: no rect-based-test nodes found,解决办法是在touch down的时候让webview滚动一下,代码如下

@Overridepublic boolean onTouch(View v, MotionEvent event) {if(event.getAction() == MotionEvent.ACTION_DOWN){int temp_ScrollY = web_info.getScrollY();web_info.scrollTo(web_info.getScrollX(), web_info.getScrollY() + 1);web_info.scrollTo(web_info.getScrollX(), temp_ScrollY);//返回原来位置,可不加}return false;}



0 0
原创粉丝点击