schmielson wrote:
> 2)  Is it possible to override URL loading (i.e. through the
> WebViewClient method shouldOverrideUrlLoading) for HTML content that
> is loaded into a WebView using its loadData method?  Whenever I click
> on any links in the HTML content I've passed to loadData the
> shouldOverrideUrlLoading method is not called even though I have
> explicitly set the WebView's WebViewClient with
> setWebViewClient([subclass of WebViewClient where
> shouldOverrideUrlLoading is overridden).  However, if I use
> loadUrl("http://www.cnn.com";), for example, with the same WebView
> object, the shouldOverrideUrlLoading method is called and I can
> intercept the handling.

Try using loadDataWithBaseUrl(), providing a bogus base (e.g., 
"fake://this/is/not/real"). With a null base URL (which is what 
loadData() effectively uses), you run into more security issues than 
with a fake base URL...even if the base URL is never really used.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 1.3 Published!

--~--~---------~--~----~------------~-------~--~----~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to