我有几个全屏幕图像画廊。我想限制一扔手势只能提前一个图像的时间(像HTC库应用程序)。什么是实现这一目标的右/最简单的方法是什么?
I have a gallery with several full screen images. I want to limit the fling gesture to only advance one image at a time (like the HTC Gallery app). What's the right/easiest way to achieve this?
简单地覆盖画廊Widget的 onFling()
方法,不调用超 onFling()
方法。
Simply override the Gallery Widget's onFling()
method and don't call the superclass onFling()
method.
这将使每刷卡画廊提前一个项目。
This will make the gallery advance one item per swipe.