Disable single and long tap

This commit is contained in:
Alex 2017-08-04 14:15:14 +03:00
parent c4a1019530
commit eb0a501873

View file

@ -5,22 +5,26 @@ import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.PointF;
import net.osmand.data.LatLon;
import net.osmand.data.PointDescription;
import net.osmand.data.QuadPoint;
import net.osmand.data.RotatedTileBox;
import net.osmand.plus.GPXUtilities.WptPt;
import net.osmand.plus.OsmAndFormatter;
import net.osmand.plus.R;
import net.osmand.plus.views.ContextMenuLayer;
import net.osmand.plus.views.OsmandMapLayer;
import net.osmand.plus.views.OsmandMapTileView;
import net.osmand.util.MapUtils;
import java.util.LinkedList;
import java.util.List;
import gnu.trove.list.array.TIntArrayList;
public class MeasurementToolLayer extends OsmandMapLayer {
public class MeasurementToolLayer extends OsmandMapLayer implements ContextMenuLayer.IContextMenuProvider {
private OsmandMapTileView view;
private boolean inMeasurementMode;
@ -177,4 +181,34 @@ public class MeasurementToolLayer extends OsmandMapLayer {
public boolean drawInScreenPixels() {
return false;
}
@Override
public void collectObjectsFromPoint(PointF point, RotatedTileBox tileBox, List<Object> o) {
}
@Override
public LatLon getObjectLocation(Object o) {
return null;
}
@Override
public PointDescription getObjectName(Object o) {
return null;
}
@Override
public boolean disableSingleTap() {
return isInMeasurementMode();
}
@Override
public boolean disableLongPressOnMap() {
return isInMeasurementMode();
}
@Override
public boolean isObjectClickable(Object o) {
return !isInMeasurementMode();
}
}