Android WebView prevent page reload

前端 未结 2 1046
长发绾君心
长发绾君心 2020-12-21 00:22

I have a Phonegap packaged application that opens a PDF Viewer when a button is pressed. I did it with the FileOpener2 plugin.

When I go back to the application from

2条回答
  •  春和景丽
    2020-12-21 00:47

    In android.webkit.WebViewClient onLoadResource callback invoke stopLoading of WebView

    MyWebViewClient extend WebViewClient {
    
    public void onLoadResource (WebView view, String url) {
        if(your condition ){
             view.stopLoading();
        }
    }
    }
    

提交回复
热议问题