Skip to content

Instantly share code, notes, and snippets.

@t4kemyh4nd
Created August 27, 2021 05:37
Show Gist options
  • Save t4kemyh4nd/05f5a06c85d210b11ce57aca3426f4c5 to your computer and use it in GitHub Desktop.
Save t4kemyh4nd/05f5a06c85d210b11ce57aca3426f4c5 to your computer and use it in GitHub Desktop.
private void initView() {
initSettings(this.mView.getSettings());
this.mView.setWebViewClient(new HybridViewClient(this));
HybridChromeClient hybridChromeClient = new HybridChromeClient();
hybridChromeClient.setHybridManager(this);
this.mView.setWebChromeClient(hybridChromeClient);
if (HybridView.DEBUG) {
WebView.setWebContentsDebuggingEnabled(true);
}
HybridView hybridView = this.mView;
JsInterface jsInterface = this.mJsInterface;
hybridView.addJavascriptInterface(jsInterface, jsInterface.getInterfaceName());
this.mView.addOnAttachStateChangeListener(this.mAttachStateChangeListener);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment