[android-developers] Re: Asset Image in WebView

2009-03-29 Thread Mark Murphy
Beginner wrote: Hi, I'm trying to load an image (tried both gif and png) from my assets directory, into a webview. In my assets folder, I have an image called myImage.gif Here's my code: WebView data = (WebView) findViewById(R.id.data) data.loadData(IMG HEIGHT=\42px\ WIDTH=\42px\

[android-developers] Re: Asset Image in WebView

2009-03-29 Thread Beginner
Wow. That worked. Thanks a bunch. Is there a bug already opened for this? Or... On Mar 29, 8:47 pm, Mark Murphy mmur...@commonsware.com wrote: Beginner wrote: Hi, I'm trying to load an image (tried both gif and png) from my assets directory, into a webview. In my assets folder, I

[android-developers] Re: Asset Image in WebView

2009-03-29 Thread Mark Murphy
Beginner wrote: Wow. That worked. Thanks a bunch. Is there a bug already opened for this? Or... There was a bug already opened. And closed. Without what I would consider an adequate explanation. It's one of my pet peeves, which is why I come up with slightly different fake URLs to try to

[android-developers] Re: Asset Image in WebView

2009-03-29 Thread Beginner
I thought this might have fixed my problem, but not quite. Since the apk is readonly, it seems I can't put any files in the assets directory at runtime. So I can't grab an image, put it in there, and then have the webview load it. Is it possible to load an image from the files directory?

[android-developers] Re: Asset Image in WebView

2009-03-29 Thread Ralf
In this case simply use a data URI when creating the loadData string. See 4. Examples at http://www.ietf.org/rfc/rfc2397.txt R/ On Sun, Mar 29, 2009 at 6:44 PM, Beginner ayrton.merc...@gmail.com wrote: I thought this might have fixed my problem, but not quite. Since the apk is readonly, it

[android-developers] Re: Asset Image in WebView

2009-03-29 Thread Beginner
That would work, if I was getting the entire data from one source. As it stands, I'm getting part of the data (text) from one URL and another part (image) from a different URL. So I get both pieces of data then I have to combine them in a webview. On Mar 29, 11:02 pm, Ralf ralfo...@gmail.com