简体   繁体   English

检测Webview android中的URL更改

[英]Detect URL changes in Webview android

I am using android webview and loading an url. 我正在使用android webview并加载网址。 Inside the webview, there are certain click events and on clicking , the UI inside webview is changed. 在Webview中,存在某些单击事件,并且在单击时,Webview中的UI发生了变化。 I am not getting any callback in shouldOverrideUrlLoading(...) . 我没有在ShouldOverrideUrlLoading(...)中得到任何回调。 Is there a way to detect the changes inside webview in android? 有没有一种方法可以检测android中的webview内部变化?

The shouldOverrideUrlLoading() is called only when baseUrl changes. 仅当baseUrl更改时,才会调用shouldOverrideUrlLoading()

The onPageFinished(WebView view, String url) method is called when every url changes and loads. 当每个URL更改并加载时调用onPageFinished(WebView视图,String url)方法。 The Url can be parsed to find out the change. 可以解析Url以找出更改。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM