开发者

How do you implement an onFling event in TouchImageView so it acts like the galleries you see in Facebook or Google+

开发者 https://www.devze.com 2023-04-12 15:45 出处:网络
There are a handful of questions out there, but none really provided a clear solution to this problem.Android does not have anything built in to do so, so Mike Ortiz implemented TouchImageView which i

There are a handful of questions out there, but none really provided a clear solution to this problem. Android does not have anything built in to do so, so Mike Ortiz implemented TouchImageView which is awesome. It works perfectly for what it is supposed t开发者_如何学Co do. But now I want to turn this into a Gallery that uses the onFling gesture to scroll in another TouchImageView. What is the best way to do so?


I forked MikeOrtiz's TouchImageView to add ViewPager compatible capability. Check it out here: Forked TouchImageView


I wanted the same functionality and I found out ViewPager is the best solution of all. http://android-developers.blogspot.com/2011/08/horizontal-view-swiping-with-viewpager.html

Here is the sample code which may work for you,

Set default page for ViewPager in Android

0

精彩评论

暂无评论...
验证码 换一张
取 消