use of com.just.agentweb.WebViewClient in project AgentWeb by Justson.
the class JsbridgeWebFragment method getWebViewClient.
private WebViewClient getWebViewClient() {
return new WebViewClient() {
BridgeWebViewClient mBridgeWebViewClient = new BridgeWebViewClient(mBridgeWebView);
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
return mBridgeWebViewClient.shouldOverrideUrlLoading(view, url);
}
@Override
public boolean shouldOverrideUrlLoading(WebView view, WebResourceRequest request) {
if (mBridgeWebViewClient.shouldOverrideUrlLoading(view, request.getUrl().toString())) {
return true;
} else {
return super.shouldOverrideUrlLoading(view, request);
}
}
@Override
public void onPageStarted(WebView view, String url, Bitmap favicon) {
super.onPageStarted(view, url, favicon);
}
@Override
public void onPageFinished(WebView view, String url) {
super.onPageFinished(view, url);
mBridgeWebViewClient.onPageFinished(view, url);
}
};
}
Aggregations