andremion / Louvre

A small customizable library useful to handle an gallery image pick action built-in your app. :sunrise_over_mountains::stars:
https://play.google.com/store/apps/details?id=com.andremion.louvre.sample
Apache License 2.0
638 stars 94 forks source link

The crash connected with PhotoView library #16

Closed cryser29 closed 6 years ago

cryser29 commented 7 years ago

Thank you for the great library!

Context

I don't use PhotoView separately but received following crash report:

Fatal Exception: java.lang.IllegalArgumentException: pointerIndex out of range
       at android.view.MotionEvent.nativeGetAxisValue(MotionEvent.java)
       at android.view.MotionEvent.getX(MotionEvent.java:2372)
       at android.support.v4.view.ViewPager.onInterceptTouchEvent(ViewPager.java:2064)

I found following resolved issues of PhotoView library that are connected with the crash above #31 and #293. The author of PhotoView described the solution of this problem.

Possible Fix

Replace android.support.v4.view.ViewPager in activity_preview.xml with HackyViewPager.

Thank you!

andremion commented 7 years ago

Thank you @cryser29 for your tip! 👏🏻 If you prefer, you can open a PR with the solution so I can review it and later merge it. 😎

Suggestion

Put the HackyViewPager code into com.andremion.louvre.util package 😉

Thanks!