Good day! I already asked a similar question, but there was no answer to it.mapview
you mapview
me how to catch a single tap
on a mapview
map?
So far, I have managed with such a crutch, but can someone tell me an elegant solution?
private boolean tap = false; mapView.setOnTouchListener(new View.OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { switch (event.getAction()) { case MotionEvent.ACTION_UP: if(tap) Toast.makeText(context, "tap", Toast.LENGTH_SHORT).show(); break; case MotionEvent.ACTION_DOWN: tap = true; break; case MotionEvent.ACTION_MOVE: tap = false; break; } return false; } });
UPD: google maps api v1