From aa58bf4a12e8a334363fb359e978ac9eafcb6b50 Mon Sep 17 00:00:00 2001 From: PavelRatushny Date: Thu, 17 Aug 2017 18:00:53 +0300 Subject: [PATCH] Bigger select radius for tablets --- OsmAnd/res/{values-sw600dp-port => values-sw600dp}/sizes.xml | 2 ++ OsmAnd/res/values/sizes.xml | 2 ++ .../net/osmand/plus/measurementtool/MeasurementToolLayer.java | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) rename OsmAnd/res/{values-sw600dp-port => values-sw600dp}/sizes.xml (73%) diff --git a/OsmAnd/res/values-sw600dp-port/sizes.xml b/OsmAnd/res/values-sw600dp/sizes.xml similarity index 73% rename from OsmAnd/res/values-sw600dp-port/sizes.xml rename to OsmAnd/res/values-sw600dp/sizes.xml index e4cf1852c8..5b2f539723 100644 --- a/OsmAnd/res/values-sw600dp-port/sizes.xml +++ b/OsmAnd/res/values-sw600dp/sizes.xml @@ -2,4 +2,6 @@ 300dp 200dp + + 48dp \ No newline at end of file diff --git a/OsmAnd/res/values/sizes.xml b/OsmAnd/res/values/sizes.xml index 1c027babfc..b9169ed80e 100644 --- a/OsmAnd/res/values/sizes.xml +++ b/OsmAnd/res/values/sizes.xml @@ -158,4 +158,6 @@ 48dp 360dp + + 20dp \ No newline at end of file diff --git a/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolLayer.java b/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolLayer.java index 2da6bbf141..1397deb57e 100644 --- a/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolLayer.java +++ b/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolLayer.java @@ -193,7 +193,7 @@ public class MeasurementToolLayer extends OsmandMapLayer implements ContextMenuL private void selectPoint(double x, double y, boolean singleTap) { clearSelection(); RotatedTileBox tb = view.getCurrentRotatedTileBox(); - double lowestDistance = AndroidUtils.dpToPx(view.getContext(), 20); + double lowestDistance = view.getResources().getDimension(R.dimen.measurement_tool_select_radius); for (int i = 0; i < measurementPoints.size(); i++) { WptPt pt = measurementPoints.get(i); if (tb.containsLatLon(pt.getLatitude(), pt.getLongitude())) {