Android的检测网页流量URL变化 [英] Android detect webview URL change

查看:245
本文介绍了Android的检测网页流量URL变化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的Andr​​oid应用程序网页视图,并想检测什么时候去URL变化。

I have a webview in my android app and would like to detect when de url changes.

我想用这个隐藏在最上面一栏的信息按钮,当用户是info.php的页面上,并显示它时再他不是info.php的页面上。

I want to use this to hide the info button in the top bar when the user is on the info.php page and show it again when he is not on the info.php page.

我GOOGLE了,但找不到任何工作code,任何人可以帮助我吗?

I googled but can't find any working code, can anybody help me?

Thx提前!

推荐答案

您可以使用<一个href=\"http://developer.android.com/reference/android/webkit/WebViewClient.html#shouldOverrideUrlLoading%28android.webkit.WebView,%20java.lang.String%29\"相对=nofollow> WebViewClient.shouldOverrideUrlLoading 来检测你的WebViewClient

You can use WebViewClient.shouldOverrideUrlLoading to detect every URL changes on your WebViewClient

这篇关于Android的检测网页流量URL变化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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