From 6fcf27d4cec75b59afb5ffd9fe919a6b775d4083 Mon Sep 17 00:00:00 2001 From: HarshEvilGeek Date: Wed, 11 Feb 2015 13:53:56 +0530 Subject: [PATCH] fixing touchslop changes --- library/src/main/java/com/daimajia/swipe/SwipeLayout.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/library/src/main/java/com/daimajia/swipe/SwipeLayout.java b/library/src/main/java/com/daimajia/swipe/SwipeLayout.java index c73b131..15377fa 100644 --- a/library/src/main/java/com/daimajia/swipe/SwipeLayout.java +++ b/library/src/main/java/com/daimajia/swipe/SwipeLayout.java @@ -843,15 +843,15 @@ public class SwipeLayout extends FrameLayout { if (getOpenStatus() == Status.Close) { int lastCurrentDirectionIndex = currentDirectionIndex; if (angle < 45) { - if (mLeftIndex != -1 && distanceX > mTouchSlop) { + if (mLeftIndex != -1 && distanceX > 0) { currentDirectionIndex = mLeftIndex; - } else if (mRightIndex != -1 && distanceX < -mTouchSlop) { + } else if (mRightIndex != -1) { currentDirectionIndex = mRightIndex; } } else { - if (mTopIndex != -1 && distanceY < -mTouchSlop) { + if (mTopIndex != -1 && distanceY < 0) { currentDirectionIndex = mTopIndex; - } else if (mBottomIndex != -1 && distanceY > mTouchSlop) { + } else if (mBottomIndex != -1) { currentDirectionIndex = mBottomIndex; } }