OnTouch in MapView only fires the first time

后端 未结 6 889
没有蜡笔的小新
没有蜡笔的小新 2020-12-17 02:04

I\'m trying to implement a double-tap zoom like function in my MapView. The event always fires the first time, but never subsequent times. Below is my code. I have a feeling

6条回答
  •  天命终不由人
    2020-12-17 02:44

    you should at least put

    lasttime=event.getEventTime();
    

    under the

    if (event.getAction() == MotionEvent.ACTION_DOWN) brakes 
    

    while onTouch detect ACTION_UP event of your click. So any time you make a click it is called 2 times

提交回复
热议问题