Display multiple images from a remote source in a gallery (zoomable+pannable)

by legr3c » Wed, 02 Jun 2010 08:23:35 GMT

Sponsored Links
 I want do display some images that I load from a remote source in a
gallery. The gallery should let the user do the following things:

-zoom the image (preferably also by pinch-zoom)
-pan the image
-switch between the different images

Of course most built-in gallery applications can do all of that. So my
first idea was to use an  ACTION_VIEW intent in order to delegate the
task to some gallery application. This however won't work for me since
you can only pass the URI of the image you want to display but not the
actual bitmap data itself. I can't just pass the URL of the remote
image because I need to manage the loading and caching of the data
A way around this would be to write the data to a local file and then
pass the URI of that file (and deleting the file again afterward).
Besides this being less than elegant it won't even do the trick
because with an intent like this you can only pass one image at a

The built-in Facebook application on the Nexus One actually does
exactly what I have in mind for displaying photo albums. It looks like
a custom gallery activity they built into their application. Does
anyone know whether there are templates available for something like
this somewhere that one could reuse? Building something like this from
scratch by myself seems too time consuming.

I think that what I want to do is a fairly common task, yet I haven't
been able to find a satisfactory solution.
I would be very glad for any hints on how this could be accomplished!


Other Threads

1. New error in the Market

In thousands of sales, I've never seen this one:

You cancelled this order.
Reason: Other (describe below)
Message sent to customer: Order canceled due to internal error in

Since the buyer hasn't repurchased, I hate to think that I've lost a
sale due to an "internal error."

The Market team is truly a disgrace to Google, sorry to say.


2. Auto android:debuggable. Anybody got it working?

Doesn't work for me either


3. How to perform Google checkout in My application

4. Concern on AsyncTask in an Activity

5. Dialog Resize on Keyboard Up

6. How to include line break in notification?

7. Adding TouchListener to a line drawn on mapView