Android的检测网页流量URL变化 [英] Android detect webview URL change
问题描述
我在我的Android应用程序网页视图,并想检测什么时候去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屋!