[Android] SlidingMenu: use a different solution, submitted upstream

Jean-Baptiste Kempf git at videolan.org
Tue Oct 30 11:17:51 CET 2012


vlc-ports/android | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Tue Oct 30 12:17:45 2012 +0100| [c76c5d6c1039e6862de0ddba282ef151bec89de5] | committer: Jean-Baptiste Kempf

SlidingMenu: use a different solution, submitted upstream

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=c76c5d6c1039e6862de0ddba282ef151bec89de5
---

 .../SlidingMenu/src/com/slidingmenu/lib/CustomViewAbove.java    |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/java-libs/SlidingMenu/src/com/slidingmenu/lib/CustomViewAbove.java b/java-libs/SlidingMenu/src/com/slidingmenu/lib/CustomViewAbove.java
index 455a5cb..44d4a9e 100644
--- a/java-libs/SlidingMenu/src/com/slidingmenu/lib/CustomViewAbove.java
+++ b/java-libs/SlidingMenu/src/com/slidingmenu/lib/CustomViewAbove.java
@@ -780,10 +780,15 @@ public class CustomViewAbove extends ViewGroup {
 		switch (action) {
 		case MotionEvent.ACTION_MOVE:
 			final int activePointerId = mActivePointerId;
-			if (activePointerId == INVALID_POINTER || activePointerId >= ev.getPointerCount())
+			if (activePointerId == INVALID_POINTER)
 				break;
 
 			final int pointerIndex = MotionEventCompat.findPointerIndex(ev, activePointerId);
+			if (pointerIndex==-1) {
+			    mActivePointerId = INVALID_POINTER;
+			    break;
+			}
+			
 			final float x = MotionEventCompat.getX(ev, pointerIndex);
 			final float dx = x - mLastMotionX;
 			final float xDiff = Math.abs(dx);



More information about the Android mailing list