Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a XWalkView webviewclient?

I'm trying to use XWalkView as webview replacement in my android app. I noticed that there's no setWebViewClient method on XWalkView object. The thing is that I want to check when the page is finished (onPageFinished) and when the resource is loaded (onLoadResource). How can I do this with XWalkView?

I embed the XWalkView using this tutorial

embed crosswalk in android studio

like image 260
Oscar Yuandinata Avatar asked Oct 20 '15 04:10

Oscar Yuandinata


1 Answers

Cross Walk API introduces its own names for every component. Not only the WebView is renamed to XWalkView, but also WebViewClient has its counterpart named XWalkResourceClient and WebChromeClient - XWalkUIClient. So, instead of setWebViewClient you should use setResourceClient method and pass XWalkResourceClient instance to it. In this object you can implement some required methods, for example onLoadFinished. Please, consult with Cross Walk API documentation for further details.

like image 60
Stan Avatar answered Oct 04 '22 16:10

Stan