Android WebView JellyBean -> Should not happen: no rect-based-test nodes found

前端 未结 8 1628
南旧
南旧 2020-11-30 20:32

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

Whenever i swipe through the app on my Galaxy Nexus with Jelly

8条回答
  •  臣服心动
    2020-11-30 21:24

    Don't have a clue why it worked. I added onTouchEvent listener into my MainActivity.java to fix this issue.

    public class MainActivity extends ActionBarActivity implements ActionBar.TabListener {
            public class MyWebView extends WebView {
    
              public MyWebView(Context context) {
                super(context);
          }
    
          public MyWebView(Context context, AttributeSet attrs) {
            super(context, attrs);
          }
    
          @Override
          public boolean onTouchEvent(MotionEvent event) {
            onScrollChanged(getScrollX(), getScrollY(), getScrollX(), getScrollY());
            return super.onTouchEvent(event);
          }
        }
    

提交回复
热议问题