Closed rosuH closed 5 years ago
The event.findPointerIndex() might return -1 if there is no data available for that pointer identifier. So the ev.getX(index) will cause IllegalArgumentException.
event.findPointerIndex()
ev.getX(index)
IllegalArgumentException
Ref: https://developer.android.com/reference/android/view/MotionEvent#findPointerIndex(int)
Exception detail:
java.lang.IllegalArgumentException pointerIndex out of range android.view.MotionEvent.nativeGetAxisValue(Native Method) android.view.MotionEvent.getX(MotionEvent.java:2122) com.github.anzewei.parallaxbacklayout.ViewDragHelper.void processTouchEvent(android.view.MotionEvent)(TbsSdkJava:1229) com.github.anzewei.parallaxbacklayout.widget.ParallaxBackLayout.boolean onTouchEvent(android.view.MotionEvent)(TbsSdkJava:173) android.view.View.dispatchTouchEvent(View.java:10054) android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2657) android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2322) android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2663) android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2336)
The
event.findPointerIndex()
might return -1 if there is no data available for that pointer identifier. So theev.getX(index)
will causeIllegalArgumentException
.Ref: https://developer.android.com/reference/android/view/MotionEvent#findPointerIndex(int)
Exception detail: