how can handle double click on marker in android application

泪湿孤枕 提交于 2019-12-06 15:00:20

Currently you are launching your activity on single click of marker using the onMarkerClick api. In it why dont you use a timer mechanism, which will record the number of clicks. You can do it in following steps

  1. Record time on click & id of marker.
  2. Whenever you get click event on marker. Check if ID is same as previous one and also the time between both events is less than some threshold.
  3. If yes, Launch your activity.
  4. If No, clear the saved id to new one and record time as well.
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!