commit
f40cd01730
2 changed files with 6 additions and 16 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue