WebView in NestedScrollView gives Fatal signal 6 (SIGABRT) code -6 RenderThread

前端 未结 3 2027
伪装坚强ぢ
伪装坚强ぢ 2020-12-21 15:50

I have an activity with a ViewPager and TabLayout as below:




        
3条回答
  •  佛祖请我去吃肉
    2020-12-21 16:33

    i has same issue and then i added code delayed handler

    private void loadJavaScript(String script) {
        mHandler.postDelayed(new Runnable() {
            @Override
            public void run() {
                if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
                    if (mWebView != null) {
                        mWebView.evaluateJavascript(script, null);
                        return;
                    }
                }
    
                loadPage("javascript:" + script);
            }
        }, 500); //this 
    }
    

提交回复
热议问题