Fix night color for heading
This commit is contained in:
parent
5567a81c0e
commit
b9812ceef5
2 changed files with 9 additions and 0 deletions
|
@ -32,7 +32,9 @@
|
|||
<color name="gpx_track_fluorescent">#B400FFFF</color>
|
||||
<!-- magenta is alternate track color for cyan but less contrast in many situations: color name="gpx_track_fluorescent">#B4FF00FF</color -->
|
||||
<color name="pos_heading">#320000FF</color>
|
||||
<color name="pos_heading_night">#880000FF</color>
|
||||
<color name="pos_area">#280000FF</color>
|
||||
<color name="pos_area_night">#660000FF</color>
|
||||
<color name="pos_around">#707CDC</color> <!-- family blue similar to above -->
|
||||
|
||||
<!-- <color name="nav_track">#960000FF</color> Old blue colors - not bright enough especially in night mode -->
|
||||
|
|
|
@ -32,6 +32,7 @@ public class PointLocationLayer extends OsmandMapLayer {
|
|||
private Bitmap bearingIcon;
|
||||
private Bitmap locationIcon;
|
||||
private OsmAndLocationProvider locationProvider;
|
||||
private boolean nm;
|
||||
|
||||
private void initUI() {
|
||||
locationPaint = new Paint();
|
||||
|
@ -78,6 +79,12 @@ public class PointLocationLayer extends OsmandMapLayer {
|
|||
@Override
|
||||
public void onDraw(Canvas canvas, RectF latLonBounds, RectF tilesRect, DrawSettings nightMode) {
|
||||
// draw
|
||||
boolean nm = nightMode != null && nightMode.isNightMode();
|
||||
if(nm != this.nm) {
|
||||
this.nm = nm;
|
||||
area.setColor(view.getResources().getColor(!nm?R.color.pos_area : R.color.pos_area_night));
|
||||
headingPaint.setColor(view.getResources().getColor(!nm?R.color.pos_heading :R.color.pos_heading_night));
|
||||
}
|
||||
Location lastKnownLocation = locationProvider.getLastKnownLocation();
|
||||
if(lastKnownLocation == null || view == null){
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue