Hi all,

I've been playing with WebView and trying to see what things I can do
with it.  From my experiments I'm wondering whether the following
limitations exist with the loadData method:

1)  Are there any limitations on the link targets that can be used in
the HTML given to loadData?  Clicking on any links I've included in
the HTML content I've passed to loadData don't seem to do anything.  I
don't see any errors generated in the log either, so perhaps I'm
missing something?  An example:

myWebView.loadData("<a href=\"http://www.cnn.com\";>CNN</a>", "text/
html", "utf-8");

The link itself highlights to indicate that it has been clicked, but
the link is never loaded.

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.

3)  Is it possible to refer, in the HTML given to loadData, to an
image that has been dynamically stored on the device?  From what I can
currently tell it seems that the only way to do this is to use, for
example: <img src="data:image/png;base64,[image_content]" /> where
image_content is the actual base64-encoded image.

Thanks very much,
Dave

--~--~---------~--~----~------------~-------~--~----~
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