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
精彩评论