简体   繁体   中英

xWalkWebView while loading page?

I am working with xWalkWebView

and I would like to know the equivalent to this code

webView.setWebViewClient(new WebViewClient() {

        @Override
        public void onPageStarted(WebView view, String url, Bitmap favicon) {
            super.onPageStarted(view, url, favicon);
            // progressBar.setVisibility(View.VISIBLE);
        }

        @Override
        public void onPageFinished(WebView view, String url) {
            super.onPageFinished(view, url);
            // progressBar.setVisibility(View.GONE);
        }

        @Override
        public void onReceivedHttpAuthRequest(WebView view,
                    HttpAuthHandler handler, String host, String realm) {


        }
});

Thanks using Crosswalk, you can also ask question by sending email to

crosswalk-help@lists.crosswalk-project.org

For this question:

  mXWalkView.setUIClient(new XWalkUIClient(mXWalkView) {
        @Override
        public void onPageLoadStarted(XWalkView view, String url) {
            System.out.println("onPageLoadStarted  " +url);
        }
        @Override
        public void onPageLoadStopped(XWalkView view, String url, 
                    LoadStatus status) {
            System.out.println("onPageLoadStopped  " + status);
        }
    });

  mXWalkView.setResourceClient(new XWalkResourceClient(mXWalkView) {
        @Override
        public void onReceivedHttpAuthRequest(XWalkView view, 
                    XWalkHttpAuthHandler handler, String host, String realm) {
            System.out.println("onReceivedHttpAuthRequest");
        }
    });

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM