不能使用PhotoSwipe与android webview

时间:2013-04-13 13:28:42

标签: android webview gallery photoswipe

这是我的网络视图配置

    WebSettings webSettings = myWebView.getSettings();                           
    webSettings.setJavaScriptEnabled(true);
    webSettings.setBuiltInZoomControls(true);
    webSettings.setSupportZoom(true);
    webSettings.setJavaScriptCanOpenWindowsAutomatically(true);
    webSettings.setPluginsEnabled(true);
    webSettings.setLoadWithOverviewMode(true);
    webSettings.setUseWideViewPort(true);
    webSettings.setSupportMultipleWindows(true);
    webSettings.setLoadsImagesAutomatically(true);
    webSettings.setLightTouchEnabled(true);
    webSettings.setDomStorageEnabled(true);
    myWebView.setInitialScale(1);
    myWebView.setScrollBarStyle(WebView.SCROLLBARS_OUTSIDE_OVERLAY);
    myWebView.setScrollbarFadingEnabled(false);
    myWebView.clearHistory();
    myWebView.clearFormData();
    myWebView.clearCache(true);


    //Set URL
    setExplorer(url+lang);

    //Set Click Url
    myWebView.setWebViewClient(new WebViewClient(){
        @Override
        public boolean shouldOverrideUrlLoading(WebView view, String url) {
            return false;
        }


    });



    //Set Progress Bar
    myWebView.setWebChromeClient(new WebChromeClient() {
        public void onProgressChanged(WebView view, int progress) 
        {
            if(progress < 100 && Pbar.getVisibility() == ProgressBar.GONE){
                Pbar.setVisibility(ProgressBar.VISIBLE);

            }
            Pbar.setProgress(progress);
            if(progress == 100) {
                Pbar.setVisibility(ProgressBar.GONE);
            }
        }
    });

我正在尝试的网址是“http://www.photoswipe.com/latest/examples/04-jquery-mobile.html

当我的webview加载网页时,一切看起来都不错,但是当我点击图片库中的图片时,我看到一个长高的滚动条,我看不到图像,或者至少不正确如果我使用的是谷歌浏览器android 4.2.1。

我不适合我,我使用的是android api 7

0 个答案:

没有答案