aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Greiss <kufikugel@googlemail.com>2014-04-12 10:41:26 +0200
committerLars Greiss <kufikugel@googlemail.com>2014-04-12 10:41:26 +0200
commite0c4e9687179d67e4d197a11054c7da7415b5f58 (patch)
tree39ac6afd7213e8a6920c775bb7838df2e008687b
parent8ba38deefee0bfdd6c16079f03df51a51459ae25 (diff)
Cardslib: do not pass trough touch event to gesture listener during swipe
New implementation allows us now to block gesture listener events during the user is swiping. Way more consistent and solves as well a possible crash on SlimRecents if the user is swiping the card nearly completely away and at the same time pinching to clear all (well rarly will ever happen but save is save) Change-Id: I1365f1b4113e5f764dbf38c9fe4476148de1d496
-rw-r--r--src/com/android/cards/view/listener/SwipeDismissListViewTouchListener.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/android/cards/view/listener/SwipeDismissListViewTouchListener.java b/src/com/android/cards/view/listener/SwipeDismissListViewTouchListener.java
index 661804e..7a7b83b 100644
--- a/src/com/android/cards/view/listener/SwipeDismissListViewTouchListener.java
+++ b/src/com/android/cards/view/listener/SwipeDismissListViewTouchListener.java
@@ -191,7 +191,7 @@ public class SwipeDismissListViewTouchListener implements View.OnTouchListener {
if (mViewWidth < 2) {
mViewWidth = mListView.getWidth();
}
- if (mGestureDetector != null) {
+ if (mGestureDetector != null && !mSwiping) {
mGestureDetector.onTouchEvent(motionEvent);
}