Tuesday, August 30, 2011

[android-developers] Displaying images in WebView... Which way is most efficient?

In my research I've seen two ways to display an image in a WebView.

1.) Load a Base64 string with the raw image bytes, as done here:


2.) Reference an image from the assets directory, as done here:

Which way is the most efficient?

I'm wondering because it would be nice to not have to keep images
outside of the drawables directory, yet it seems that method one is
doing a lot of work. Does android basically do the same thing (as
method one) under the hood of the WebView?


You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
For more options, visit this group at

No comments:

Post a Comment