I have zoomable image and I’m using ScaleGestureDetector.SimpleOnScaleGestureListener. I need to implement following items:
- On Single Tap appear Toast with information about picture.
- On Double Tap image is zooming.
I have some issue. Before Double Tap always is Single Tap and picture is zooming, but appear Toast. Is there any way to avoid Single Tap? I dont have enough savvy to solve this problem.
P.S. I can’t use OnDoubleTapListener because use ScaleGestureDetector.SimpleOnScaleGestureListener.
UPD
case MotionEvent.ACTION_UP:
firstTime = System.currentTimeMillis();
if (Math.abs(firstTime-secondTime) < 300L) {
// scale my matrix
---//---
DONE = true; //this flag symbolize, that toast doesn't appear (false - appears)
}
else if (!DONE) {
// making toast
}
secondTime = firstTime;
break;
When DoubleTap is enable image scaled but appears toast
@matt5784, thank you. I was able to solve my problem.