Reputation: 6575
I've just written an app with a nice photo gallery for iOS, now I'd like to do the same thing with my Android version of the app. I see that the Android Gallery API allows me to build a scrolling gallery of images. But what I really want is an apple-photo gallery style interface with a grid of thumbnails which, when tapped, open up a full screen display of the selected image and allows me to navigate through the photo gallery using swipes or left/right arrows on a tool bar.
In iOS I used the KTPhotoBrowser to achieve this interface, but I haven't been able to find anything like that for Android. Can anybody point me to a library, or even a tutorial with example code which will give me an interface like that without having to roll it myself?
Update: I've found the GridView Tutorial which describes how to put image thumbnails into a grid, seems to be the perfect thing. The Gallery API can be used for the full size photo browser as shown in @ariefbayu sample code (see link in comments below). It's not quite the same as the iPhone style gallery, but it's pretty good.
Upvotes: 3
Views: 6332
Reputation: 21979
I've done this kind of interface. The basic is:
MainActivity
load images into GridView
.Intent
, called SlideActivity
which extends 'Gallery' in full screen mode where this will:
Gallery
and set current image to selectedLink to sample code: https://www.dropbox.com/s/xk2oupma8zcxqpf/GridToGallery.zip
Upvotes: 6