Question

In one part of my app, I'm trying to make a gallery of photos that you can browser through. I want to have a snapping effect similar to the Gallery class. I want it to have a snapping effect every time you swipe from one image to the next in the list. This would be similar to the Gallery app where you browser through photos, or who you swipe through your gallery of apps. Every time you swipe, it has a "snapping" effect. What would be the easiest way to do this?

I know in the newer Android APIs the Gallery deprecated, so that is out of the question.

Was it helpful?

Solution

You want ViewPager. It's included in the compatibility package and described in this Android Developers blog post.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top