WebView中显示的某些环节空白视图 [英] WebView displays a blank view for certain links

查看:125
本文介绍了WebView中显示的某些环节空白视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的WebView:

I'm using a webview:

        WebView webview = new WebView(this);
        webview.getSettings().setJavaScriptEnabled(true);
        webview.getSettings().setLoadWithOverviewMode(true);
        webview.getSettings().setUseWideViewPort(true);
        webview.getSettings().setGeolocationEnabled(true);
        webview.setWebViewClient(new WebViewClient(){

                @Override
                public boolean shouldOverrideUrlLoading(WebView view, String url) {
                    loading.show();
                    view.loadUrl(url);
                    return true;
                }
                @Override
                public void onPageFinished(WebView view, final String url) {
                    loading.dismiss();
                    super.onPageFinished(view, url);
                }
            });

对于大多数链接,它工作得很好。但, http://m.stubhub.com (以及任何同一域),那只能说明一个空白视图(尽管它完成加载页)。有没有设置,我失去了什么?

For most links, it works just fine. But for, http://m.stubhub.com (and any of the same domain), it only shows a blank view (though it's finished loading the page). Are there settings, I'm missing or something?

顺便说一句,没有任何错误,据我可以告诉。

Btw, there aren't any errors, as far as I can tell.

建议/意见很大AP preciated。谢谢你。

Suggestions/advice greatly appreciated. Thanks.

推荐答案

解决方案是要求该网站的权限。它使用HTML5的存储,所以对于DOMStorage许可必须启用...

The solution was the permissions the site required. It uses HTML5 storage, so permission for DOMStorage had to be enabled...

这篇关于WebView中显示的某些环节空白视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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