Friday, February 18, 2011

[android-developers] WebViewClient callbacks called too often

When I call WebView#loadUrl I expect that I should only get a single WebViewClient#onPageFinished call and no WebViewClient#shouldOverrideUrlLoading call.  However, I get a WebViewClient#shouldOverrideUrlLoading (which I implement by always calling WebView#loadUrl and returning true) and then two WebViewClient#onPageFinished calls with the same URL.

The page I'm loading uses a lot of ajax requests.  Do ajax requests invoke the WebViewClient?  My page does not have any meta-refreshes in it.

This is quite frustrating.  Am I doing something wrong?

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment