Re: [android-developers] Re: Clarification on loading local images with WebView

2010-05-13 Thread Jeff Thorn
I appreciate your help. I think I will just open the large image in a new custom Activity. On May 13, 2010 7:38 PM, "Mark Murphy" wrote: Jeff Thorn wrote: > PS - meant something OTHER than. Droid autospell. :) > > On May 13, 2010 7:18 P... > > wrote: > > You would t

Re: [android-developers] Re: Clarification on loading local images with WebView

2010-05-13 Thread Mark Murphy
Jeff Thorn wrote: > PS - meant something OTHER than. Droid autospell. :) > > On May 13, 2010 7:18 PM, "Jeff Thorn" > wrote: > > You would think huh? But I got the impression for the docs that that > method just allows you return a file segment using an offset and len

Re: [android-developers] Re: Clarification on loading local images with WebView

2010-05-13 Thread Jeff Thorn
PS - meant something OTHER than. Droid autospell. :) On May 13, 2010 7:18 PM, "Jeff Thorn" wrote: You would think huh? But I got the impression for the docs that that method just allows you return a file segment using an offset and length. Can you do something like: File f = new File("assets/m

Re: [android-developers] Re: Clarification on loading local images with WebView

2010-05-13 Thread Jeff Thorn
You would think huh? But I got the impression for the docs that that method just allows you return a file segment using an offset and length. Can you do something like: File f = new File("assets/myfile.png"); I wish you could create a ParcelFileDescriptor with something Oberlin than a File. On

Re: [android-developers] Re: Clarification on loading local images with WebView

2010-05-13 Thread Mark Murphy
Jeff Thorn wrote: > Regarding option 1 - if I create a content provider it appears I need to > implement the openFile method and return a ParcelFileDescriptor. Sounds > easy enough. But how do you create a File object from something in the > assets directory? Perhaps use openAssetFile() instead?

Re: [android-developers] Re: Clarification on loading local images with WebView

2010-05-13 Thread Jeff Thorn
Regarding option 1 - if I create a content provider it appears I need to implement the openFile method and return a ParcelFileDescriptor. Sounds easy enough. But how do you create a File object from something in the assets directory? On May 13, 2010 4:12 PM, "Mark Murphy" wrote: Jeff wrote: > 1

Re: [android-developers] Re: Clarification on loading local images with WebView

2010-05-13 Thread Mark Murphy
Jeff wrote: > 1. Should I load it with my WebView? I thought I could use img tags > with urls like file:///android_asset/myimage.png. But this does not > seem to work. As I wrote in my previous reply: Try creating a ContentProvider to serve the image, and see if you have better luck with a conten

[android-developers] Re: Clarification on loading local images with WebView

2010-05-13 Thread Jeff
Thanks Mark. I could use some advice on the best approach to this problem The image that I am trying to display is very large and I want to preserve its detail. So I am including it in the apk in the assets/ directory. My app almost exclusively uses WebView to display content. I am trying to f