RLScott wrote: > On Dec 9, 7:44 am, skink <[email protected]> wrote: > > RLScott wrote: > > > I am writing some help files in HTML that will be displayed in a > > > WebView. The HTML files are in the assets folder. In those help > > > files I want to refer to some images used in ImageButtons. Those > > > images are in res/drawable. I know I could simply make a duplicate PNG > > > file for the button images in assets and that works fine. But I would > > > rather not duplicate the images for two reasons: 1. It is a waste of > > > space to store images twice. 2. Having duplicate sources makes it > > > difficult to maintain the software. If I should ever change the > > > button image I would have to remember to change the duplicate PNG file > > > in assets to keep the help file up to date. > > > > > I tried referring to the image in my HTML file as "../drawable/ > > > imagename.png and it didn't work. Is there some way to make my HTML > > > in the WebView refer to images that are in a different folder in the > > > application package? > > > > hi, what about custom ContentProvider serving Drawables? > > I have no idea how to reference the custom ContentProvider in HTML. I > should mention that I am using the ancient Adobe GoLive 5 to make my > HTML.
Just firgot if your app is 2.2+ you can use special content provider, quoting ContentResolver docs: android.resource //package_ name/ type/name package_name is your package name as listed in your AndroidManifest.xml . For example com.example.myapp type is the string form of the resource type. For example, raw or drawable. name is the string form of the resource name. pskink -- 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

