Fix 6399813: tapping on a photo that isn't in the middle of the screen doesn't select it.
Also make tapping while flinging stop the scroll instead of opening the item.
Change-Id: Iefef4738d7d74b29e4594ea3ae2cb1c91e0e17ab
diff --git a/src/com/android/gallery3d/ui/PositionController.java b/src/com/android/gallery3d/ui/PositionController.java
index 03fe65b..c09ffea 100644
--- a/src/com/android/gallery3d/ui/PositionController.java
+++ b/src/com/android/gallery3d/ui/PositionController.java
@@ -1003,6 +1003,16 @@
return edges;
}
+ public boolean isScrolling() {
+ return mPlatform.mAnimationStartTime != NO_ANIMATION
+ && mPlatform.mCurrentX != mPlatform.mToX;
+ }
+
+ public void stopScrolling() {
+ if (mPlatform.mAnimationStartTime == NO_ANIMATION) return;
+ mPlatform.mFromX = mPlatform.mToX = mPlatform.mCurrentX;
+ }
+
////////////////////////////////////////////////////////////////////////////
// Private utilities
////////////////////////////////////////////////////////////////////////////