Closed hardikamal closed 8 years ago
:+1: Happens to me as well. If I pinch to zoom-out (to the end -> so the image gets a bit smaller), and then try to move my fingers down (still touching the screen with both fingers), it crashes.
I am using it (Pull-back-layout
with TouchImageView
)
@blipinsk oh yes, I reproduced this bug.
It seems to be a bug of ViewDragHelper
, neither PBL nor TIV.
I'll try to find a way to work around this.
It happens at
android.support.v4.widget.ViewDragHelper.shouldInterceptTouchEvent(ViewDragHelper.java:1014)
which is
case MotionEvent.ACTION_MOVE: {
if (mInitialMotionX == null || mInitialMotionY == null) break;
// First to cross a touch slop over a draggable view wins. Also report edge drags.
final int pointerCount = MotionEventCompat.getPointerCount(ev);
for (int i = 0; i < pointerCount; i++) {
final int pointerId = MotionEventCompat.getPointerId(ev, i);
final float x = MotionEventCompat.getX(ev, i);
final float y = MotionEventCompat.getY(ev, i);
final float dx = x - mInitialMotionX[pointerId]; // <--- HERE!!!
final float dy = y - mInitialMotionY[pointerId];
// ...
Hi @xingrz, the bug in ViewHelper
seems to be fixed in the newest stable version of the Support Library (23.2.1). Would you mind updating it in your library?
@blipinsk Thank you. PullBackLayout doesn't explicitly depend on a version of Support Library. So just update the dependency of your project to the latest Support Library and it may works.
@xingrz oh yea, true, its provided
not compile
, my bad :smile: thanks
😉
App crashes if zoomin then zoomout and again zoomin...