subsampling-scale-image-view
subsampling-scale-image-view copied to clipboard
onSingleTapConfirmed gesture only being called when debugger is attached
Expected behaviour
onSingleTapConfirmed should get a callback and show a Log/Toast when on called according to the logic but it doesn't.
Actual behaviour
It doesn't get the callback but it does get the callback if the debugger is attached to the device.
Steps to reproduce
Tested on Emulator with the following code - `
gestureDetector = new GestureDetector(this, new GestureDetector.SimpleOnGestureListener() {
@Override
public boolean onSingleTapConfirmed(MotionEvent e) {
if (mapIv.isReady()) {
PointF sCoord = mapIv.viewToSourceCoord(e.getX(), e.getY());
Toast.makeText(HomeActivity.this, "touched x:" + sCoord.x + ", y:" + sCoord.y, Toast.LENGTH_LONG).show();
}
return true;
}
});
mapIv.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View view, MotionEvent motionEvent) {
return gestureDetector.onTouchEvent(motionEvent);
}
});
`
Affected devices
Tested on Pixel 3a emulator with android 10
Happening the same for me too. Any update on this??