use of com.github.lzyzsd.jsbridge.BridgeHelper in project JsBridge by lzyzsd.
the class CustomWebView method init.
private void init() {
this.setVerticalScrollBarEnabled(false);
this.setHorizontalScrollBarEnabled(false);
this.getSettings().setJavaScriptEnabled(true);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
WebView.setWebContentsDebuggingEnabled(true);
}
bridgeHelper = new BridgeHelper(this);
this.setWebViewClient(new WebViewClient() {
@Override
public void onPageFinished(WebView webView, String s) {
bridgeHelper.onPageFinished();
}
@Override
public boolean shouldOverrideUrlLoading(WebView webView, String s) {
return bridgeHelper.shouldOverrideUrlLoading(s);
}
});
}
Aggregations