如何从android的web视图中获取当前页面的url [英] how to get the current page url from the web view in android
本文介绍了如何从android的web视图中获取当前页面的url的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
使用 webview.loadUrl(url)
方法打开一个 url.如果我单击视图上的任何 Button
,它会指向另一个页面.现在我想获取定向页面的 url.我怎样才能得到它?
Using webview.loadUrl(url)
method I open an url. If I click any Button
on the view it directs to another page. Now I want to get the url of the directed page. how can I get it?
我也想要显示在 webview 上的内容.如何获取WebView
的内容?
I also want the content that is displayed on the webview. How to get the content of the WebView
?
推荐答案
String webUrl = webView.getUrl();
这篇关于如何从android的web视图中获取当前页面的url的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文