Code example for GestureDetector.SimpleOnGestureListener

0
    MapView mapView;
 
	public LocationOverlay(Context context, MapView mapView) {
		super(context, mapView);
		this.mapView = mapView;
    	OnGestureListener lis = new SimpleOnGestureListener();
		gestureDetector = new GestureDetector(context, lis);
		gestureDetector.setOnDoubleTapListener(new MyOnDoubleTapListener());
	} 
	 
	public interface SingleTapListener { 
		public boolean onSingleTap(MotionEvent e);
	} 
 
	SingleTapListener singleTapListener;
	 
	public void setSingleTapListener(SingleTapListener lis) {
		singleTapListener = lis;
	} 
	 
    private class MyOnDoubleTapListener implements GestureDetector.OnDoubleTapListener {