如何让web视图的URL [英] how to get the url of the webView

查看:71
本文介绍了如何让web视图的URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个加载web视图一个子视图,我想获得web视图的URL时,我的web视图加载一个网站,你能告诉我怎么去web视图的URL。谢谢你。

I have a Subview that load a Webview, i want to get the url of the webView when my webView load a site,can you tell me how to get the url of the webView. thank you.

推荐答案

假设 web视图的WebView的名称,你可以使用:

String webUrl = webView.getUrl();

在这里看到:<一href="http://developer.android.com/reference/android/webkit/WebView.html#getUrl()">http://developer.android.com/reference/android/webkit/WebView.html#getUrl()

这篇关于如何让web视图的URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆