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.
大家好
我正在开发一个应用程序,我想在 webView 完全加载数据后将当前页面重定向到下一页。
我该如何管理?
您可以将 WebViewClient 添加到具有回调方法的 WebView,当页面完成加载时,如下所示:
webView.setWebViewClient(new WebViewClient() { @Override public void onPageFinished(WebView view, String url) { if(myFirstUrl.equals(url) { webView.loadUrl(mySecondUrl); } }});