Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在开发一个应用程序,其中很大一部分有一系列有用的链接,这些链接在 web 视图中打开。我的链接可以正常工作,但至少有一个网站需要禁用弹出窗口阻止程序。我无论如何都找不到禁用 webview 的弹出窗口阻止程序。有没有办法做到这一点?
您可能需要setSupportMultipleWindows在WebSettings
setSupportMultipleWindows
WebSettings
告诉 WebView 是否支持多窗口。
http://developer.android.com/reference/android/webkit/WebSettings.html#setSupportMultipleWindows(boolean)
你可以这样做:
WebSettings settings = webview.getSettings(); settings.setSupportMultipleWindows(true);