PFranchise
PFranchise

Reputation: 6752

Android: How to create an image viewer/rotator

I need to make some thing similar to the iphone image viewer (the one where the image takes up much of the screen and there are dots at the bottom indicating how many images there are and which one in the sequence you are currently viewing).

I will have 3-6 images and I want right and left drag to switch between the selected image. The image must take up most of the screen. I also need dots or some other indicator indicating which image in the sequence is being viewed. It does not have to look exactly like the iPhone one described above.

Is there a fairly simple way to do this out of the box? Or will I have to write a decent amount of custom code?

Upvotes: 0

Views: 295

Answers (1)

Krylez
Krylez

Reputation: 17820

You're looking for a ViewPager to implement the main UI element, with a circle indicator for the dots. By default, the ViewPager fills its entire view with the current element, so you'll need custom behavior to get the next and previous images to "peek" in on the sides.

Upvotes: 1

Related Questions