subsampling-scale-image-view icon indicating copy to clipboard operation
subsampling-scale-image-view copied to clipboard

onSingleTapConfirmed gesture only being called when debugger is attached

Open akashpopat-honest opened this issue 4 years ago • 1 comments

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

akashpopat-honest avatar Nov 11 '21 05:11 akashpopat-honest

Happening the same for me too. Any update on this??

bharathgrandhe-utu avatar Mar 13 '22 09:03 bharathgrandhe-utu