From 4d81d797dbaca42228bcffa8badf00d4bd1a41f9 Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Mon, 13 Jul 2020 12:11:10 +0300 Subject: [PATCH] Add constant for default width multiplier --- OsmAnd/src/net/osmand/plus/GPXDatabase.java | 4 ++-- OsmAnd/src/net/osmand/plus/views/GPXLayer.java | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/GPXDatabase.java b/OsmAnd/src/net/osmand/plus/GPXDatabase.java index b25bc4aefd..d0a19e80b9 100644 --- a/OsmAnd/src/net/osmand/plus/GPXDatabase.java +++ b/OsmAnd/src/net/osmand/plus/GPXDatabase.java @@ -3,7 +3,7 @@ package net.osmand.plus; import androidx.annotation.NonNull; import androidx.annotation.Nullable; -import net.osmand.GPXUtilities; +import net.osmand.GPXUtilities.GPXFile; import net.osmand.GPXUtilities.GPXFile.GradientScaleType; import net.osmand.GPXUtilities.GPXTrackAnalysis; import net.osmand.IndexConstants; @@ -199,7 +199,7 @@ public class GPXDatabase { this.color = color; } - public GpxDataItem(File file, @NonNull GPXUtilities.GPXFile gpxFile) { + public GpxDataItem(File file, @NonNull GPXFile gpxFile) { this.file = file; color = gpxFile.getColor(0); width = gpxFile.getWidth(null); diff --git a/OsmAnd/src/net/osmand/plus/views/GPXLayer.java b/OsmAnd/src/net/osmand/plus/views/GPXLayer.java index c9ee1b2433..7cc2e97f63 100644 --- a/OsmAnd/src/net/osmand/plus/views/GPXLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/GPXLayer.java @@ -75,6 +75,7 @@ public class GPXLayer extends OsmandMapLayer implements IContextMenuProvider, IM private static final Log log = PlatformUtil.getLog(GPXLayer.class); private static final double TOUCH_RADIUS_MULTIPLIER = 1.5; + private static final int DEFAULT_WIDTH_MULTIPLIER = 7; private static final int START_ZOOM = 7; private OsmandMapTileView view; @@ -225,7 +226,7 @@ public class GPXLayer extends OsmandMapLayer implements IContextMenuProvider, IM if (hash != cachedHash) { cachedHash = hash; cachedColor = ContextCompat.getColor(view.getApplication(), R.color.gpx_track); - defaultTrackWidth = 7 * view.getDensity(); + defaultTrackWidth = DEFAULT_WIDTH_MULTIPLIER * view.getDensity(); if (rrs != null) { RenderingRuleSearchRequest req = new RenderingRuleSearchRequest(rrs); req.setBooleanFilter(rrs.PROPS.R_NIGHT_MODE, nightMode);