Hi Mark,

Thanks for the quick reply.  Unfortunately, that does not work.  The
link text becomes highlighted to indicate that it has been clicked,
but the URL is never loaded and the code in shouldOverrideUrlLoading
is never called.  I am currently considering as an alternative using
my own subclass of WebView that overrides the onTouchEvent method and
then uses a HitTestResult to determine what has been selected by the
user.  While this seems cumbersome at best, it might work....Any
thoughts on other workarounds?

Thanks very much,
Dave

On Sep 29, 6:05 pm, Mark Murphy <[EMAIL PROTECTED]> wrote:
> 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 [email protected]
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