From f9fe08dab49d285c52136c9fdf2049d8c8bfa88a Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Tue, 2 Jun 2020 17:48:00 +0300 Subject: [PATCH] Fix #9067 --- .../osmand/plus/views/OsmAndMapSurfaceView.java | 16 +--------------- .../net/osmand/plus/views/OsmandMapTileView.java | 6 +++++- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/views/OsmAndMapSurfaceView.java b/OsmAnd/src/net/osmand/plus/views/OsmAndMapSurfaceView.java index 4a9b47e008..c4d682c2fb 100644 --- a/OsmAnd/src/net/osmand/plus/views/OsmAndMapSurfaceView.java +++ b/OsmAnd/src/net/osmand/plus/views/OsmAndMapSurfaceView.java @@ -1,8 +1,6 @@ package net.osmand.plus.views; -import net.osmand.plus.views.OsmandMapLayer.DrawSettings; import android.content.Context; -import android.graphics.Canvas; import android.util.AttributeSet; import android.view.KeyEvent; import android.view.MotionEvent; @@ -102,20 +100,8 @@ public class OsmAndMapSurfaceView extends SurfaceView implements Callback { } return mapView.onTouchEvent(event); } - - @Override - protected void onDraw(Canvas canvas) { - if(mapView == null) { - return; - } - boolean nightMode = mapView.getApplication().getDaynightHelper().isNightMode(); - DrawSettings drawSettings = new DrawSettings(nightMode, false); - mapView.drawOverMap(canvas, mapView.getCurrentRotatedTileBox().copy(), drawSettings); - } - public OsmandMapTileView getMapView() { return mapView; } - -} +} \ No newline at end of file diff --git a/OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java b/OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java index 3a9c022a9f..c6576a1027 100644 --- a/OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java +++ b/OsmAnd/src/net/osmand/plus/views/OsmandMapTileView.java @@ -13,6 +13,7 @@ import android.graphics.Paint; import android.graphics.Paint.Style; import android.graphics.PointF; import android.graphics.RectF; +import android.os.Build; import android.os.Handler; import android.os.Message; import android.os.SystemClock; @@ -42,10 +43,10 @@ import net.osmand.map.MapTileDownloader.IMapDownloaderCallback; import net.osmand.plus.OsmAndConstants; import net.osmand.plus.OsmAndFormatter; import net.osmand.plus.OsmandApplication; -import net.osmand.plus.settings.backend.OsmandSettings; import net.osmand.plus.R; import net.osmand.plus.activities.MapActivity; import net.osmand.plus.helpers.TwoFingerTapDetector; +import net.osmand.plus.settings.backend.OsmandSettings; import net.osmand.plus.views.MultiTouchSupport.MultiTouchZoomListener; import net.osmand.plus.views.OsmandMapLayer.DrawSettings; import net.osmand.render.RenderingRuleSearchRequest; @@ -267,6 +268,9 @@ public class OsmandMapTileView implements IMapDownloaderCallback { view.setClickable(true); view.setLongClickable(true); view.setFocusable(true); + if (Build.VERSION.SDK_INT >= 26) { + view.setDefaultFocusHighlightEnabled(false); + } refreshMap(true); }