문제

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.

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top