Android: Easiest way to make a WebView display a Bitmap?

Posted by legr3c on Stack Overflow See other posts from Stack Overflow or by legr3c
Published on 2010-05-31T01:47:41Z Indexed on 2010/05/31 1:52 UTC
Read the original article Hit count: 680

Filed under:
|
|
|
|

I have some images that I loaded from a remote source stored in Bitmap variables and I want to display them. In addition to switching between these images the user should also be able to zoom and pan them. My first idea was to somehow pass them via an intent to the built-in gallery application but this doesn't seem to be possible. A solution that is suggested in several places is using a WebView since it already supports zooming and panning. My question is how does my Bitmap data get into the WebView? Do I have to write it to a file first, which I would have to remove again later, or is there an easier way?

Or are there even better ways to accomplish my main goal, which is displaying Bitmap data as zoomable and panable images?

© Stack Overflow or respective owner

Related posts about android

Related posts about bitmap