Android WebView links to same window with target=_blank to open new window

前端 未结 3 837
天涯浪人
天涯浪人 2020-12-28 21:03

I have a hybrid app that uses WebView to render external html from my own site. It had a problem that if any link was clicked, it started a browser window. I found this code

3条回答
  •  天命终不由人
    2020-12-28 21:21

    One more setting required for webview in addition to myWebView.getSettings().setSupportMultipleWindows(true); myWebView.setJavaScriptCanOpenWindowsAutomatically(true);

提交回复
热议问题