ikew0ng / SwipeBackLayout

An Android library that help you to build app with swipe back gesture.
Apache License 2.0
6.12k stars 1.4k forks source link

ArrayIndexOutOfBoundsException when combine chrisbanes/PhotoView and SwipeBackLayout #9

Closed djj0809 closed 11 years ago

djj0809 commented 11 years ago

Exception stack is

        java.lang.ArrayIndexOutOfBoundsException: length=1; index=1
        at me.imid.swipebacklayout.lib.ViewDragHelper.shouldInterceptTouchEvent(ViewDragHelper.java:1084)
        at me.imid.swipebacklayout.lib.SwipeBackLayout.onInterceptTouchEvent(SwipeBackLayout.java:277)
        at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1851)
        at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2205)
        at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1948)
        at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1970)
        at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1410)
        at android.app.Activity.dispatchTouchEvent(Activity.java:2509)
        at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1912)
        at android.view.View.dispatchPointerEvent(View.java:7333)
        at android.view.ViewRootImpl.deliverPointerEvent(ViewRootImpl.java:3239)
        at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:3184)
        at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:4237)
        at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:4216)
        at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:4308)
        at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:171)
        at android.view.InputEventReceiver.nativeConsumeBatchedInputEvents(Native Method)
        at android.view.InputEventReceiver.consumeBatchedInputEvents(InputEventReceiver.java:163)
        at android.view.ViewRootImpl.doConsumeBatchedInput(ViewRootImpl.java:4287)
        at android.view.ViewRootImpl$ConsumeBatchedInputRunnable.run(ViewRootImpl.java:4327)
        at android.view.Choreographer$CallbackRecord.run(Choreographer.java:725)
        at android.view.Choreographer.doCallbacks(Choreographer.java:555)
        at android.view.Choreographer.doFrame(Choreographer.java:523)
        at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:711)
        at android.os.Handler.handleCallback(Handler.java:615)
        at android.os.Handler.dispatchMessage(Handler.java:92)
        at android.os.Looper.loop(Looper.java:137)
        at android.app.ActivityThread.main(ActivityThread.java:4866)
        at java.lang.reflect.Method.invokeNative(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:511)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
        at dalvik.system.NativeStart.main(Native Method)
djj0809 commented 11 years ago

尝试了几次发生的情况应该是在两只手指进行缩放的过程中出现的

djj0809 commented 11 years ago
final float dx = x - mInitialMotionX[pointerId];

发生在这行

ikew0ng commented 11 years ago

你喵喵呗 最近好忙。

ikew0ng commented 11 years ago

fixed

MrFuFuFu commented 9 years ago

java.lang.NullPointerException at com.leixun.nvshen.view.swipeback.lib.b.shouldInterceptTouchEvent(ViewDragHelper.java:1112) at com.leixun.nvshen.view.swipeback.lib.SwipeBackLayout.onInterceptTouchEvent(SwipeBackLayout.java:371) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1827) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2241) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1946) at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1977) at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1427) at android.app.Activity.dispatchTouchEvent(Activity.java:2428) at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1925) at android.view.View.dispatchPointerEvent(View.java:7443) at android.view.ViewRootImpl.deliverPointerEvent(ViewRootImpl.java:3638) at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:3566) at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:4825) at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:4785) at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:4937) at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:179) at android.view.InputEventReceiver.nativeConsumeBatchedInputEvents(Native Method) at android.view.InputEventReceiver.consumeBatchedInputEvents(InputEventReceiver.java:171) at android.view.ViewRootImpl.doConsumeBatchedInput(ViewRootImpl.java:4905) at android.view.ViewRootImpl$ConsumeBatchedInputRunnable.run(ViewRootImpl.java:4959) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:776) at android.view.Choreographer.doCallbacks(Choreographer.java:579) at android.view.Choreographer.doFrame(Choreographer.java:546) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:762) at android.os.Handler.handleCallback(Handler.java:800) at android.os.Handler.dispatchMessage(Handler.java:100) at android.os.Looper.loop(Looper.java:194) at android.app.ActivityThread.main(ActivityThread.java:5371) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:525) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600) at dalvik.system.NativeStart.main(Native Method)

还存在该问题~~

Eeram commented 8 years ago

I know it's an old thread, but any update on this? I also get this exact same issue. Thanks!