diff options
author | Keith Mok <kmok@cyngn.com> | 2016-05-05 14:48:40 -0700 |
---|---|---|
committer | Gerrit Code Review <gerrit@cyanogenmod.org> | 2016-05-05 15:11:39 -0700 |
commit | 88ff4b9b0caf131781889d7239c07d4094b6ba8b (patch) | |
tree | 3e75f4e696750b5a79e0c13cda1d8e59365797f9 | |
parent | 713762ef3e8d24e4472a8cdf9453a709537d69e6 (diff) | |
download | android_packages_apps_CMFileManager-88ff4b9b0caf131781889d7239c07d4094b6ba8b.tar.gz android_packages_apps_CMFileManager-88ff4b9b0caf131781889d7239c07d4094b6ba8b.tar.bz2 android_packages_apps_CMFileManager-88ff4b9b0caf131781889d7239c07d4094b6ba8b.zip |
CMFileManager: Fix problem when "Use swipe gestures" on
When "Use swipe gestures" is on, click on listview item has no
effects.
Since ev.getX() or ev.getY() is returning floating point, while
the previous touch location is stored as fixed point. When
there is fractional parts in getX(), it will always return
false when it compares to the previous touch point, making the flinger
logic to think the touch does moved while it is actually not.
FEIJ-290
Change-Id: Ib208b6115c0758facf29461ef45f6ffd5c67adce
(cherry picked from commit fb5b91434a10910ce29395293f8430b0eb9a10c6)
-rwxr-xr-x | src/com/cyanogenmod/filemanager/ui/widgets/FlingerListView.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/cyanogenmod/filemanager/ui/widgets/FlingerListView.java b/src/com/cyanogenmod/filemanager/ui/widgets/FlingerListView.java index bdf20690..9a5ca528 100755 --- a/src/com/cyanogenmod/filemanager/ui/widgets/FlingerListView.java +++ b/src/com/cyanogenmod/filemanager/ui/widgets/FlingerListView.java @@ -375,7 +375,7 @@ public class FlingerListView extends ListView { if (this.mFlingingView != null) { // Only if event has changed (and only to the right and if not scrolling) if (!this.mScrolling) { - if (ev.getX() >= this.mStartX && (ev.getX() - this.mCurrentX != 0)) { + if ((int)ev.getX() >= this.mStartX && ((int)ev.getX() - this.mCurrentX != 0)) { this.mCurrentX = (int)ev.getX(); this.mTranslationX = this.mCurrentX - this.mStartX; this.mFlingingView.setTranslationX(this.mTranslationX); |