From 9f08db7f3968c588d8145ab470a0506e77df5567 Mon Sep 17 00:00:00 2001 From: sonora Date: Sun, 1 Feb 2015 09:58:53 +0100 Subject: [PATCH] Move text color to colors.xml --- OsmAnd/res/values/colors.xml | 27 ++++++++++--------- .../osmand/plus/views/MapControlsLayer.java | 5 ++-- .../net/osmand/plus/views/MapInfoLayer.java | 2 +- 3 files changed, 19 insertions(+), 15 deletions(-) diff --git a/OsmAnd/res/values/colors.xml b/OsmAnd/res/values/colors.xml index 173a9df3dc..373e552100 100644 --- a/OsmAnd/res/values/colors.xml +++ b/OsmAnd/res/values/colors.xml @@ -1,6 +1,6 @@ - #39464d + #39464d #CC080B0D #ff8f00 #b4ff8f00 @@ -15,20 +15,13 @@ #212121 #ff8f00 #536DFE - #cd2c33 - #c79c00 - #32CD32 - #EE3232 - #ffa500 - #0080FF - - - #1AFFFFFF #00000000 - #eecc22 + 0xffC8C8C8 + #A5A5A5 + #1AFFFFFF @@ -40,6 +33,16 @@ #CC33BBE0 + + #cd2c33 + #c79c00 + #32CD32 + #EE3232 + #ffa500 + #0080FF + + #eecc22 + #EE3232 @@ -86,7 +89,7 @@ #ff33b5e5 #b9b9b9 - #303030 + #303030 #ffffff #333b40 diff --git a/OsmAnd/src/net/osmand/plus/views/MapControlsLayer.java b/OsmAnd/src/net/osmand/plus/views/MapControlsLayer.java index 9e4e2305ff..a6a8a1e67e 100644 --- a/OsmAnd/src/net/osmand/plus/views/MapControlsLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/MapControlsLayer.java @@ -42,7 +42,7 @@ import android.widget.SeekBar; public class MapControlsLayer extends OsmandMapLayer { - private static final int NIGHT_COLOR = 0xffC8C8C8; + //private static final int NIGHT_COLOR = 0xffC8C8C8; private static final int TIMEOUT_TO_SHOW_BUTTONS = 5000; private final MapActivity mapActivity; private int shadowColor = -1; @@ -156,7 +156,8 @@ public class MapControlsLayer extends OsmandMapLayer { public void onDraw(Canvas canvas, RotatedTileBox tileBox, DrawSettings nightMode) { boolean isNight = nightMode != null && nightMode.isNightMode(); int shadw = isNight ? Color.TRANSPARENT : Color.WHITE; - int textColor = isNight ? NIGHT_COLOR : Color.BLACK ; + //int textColor = isNight ? NIGHT_COLOR : Color.BLACK ; + int textColor = isNight ? mapActivity.getResources().getColor(R.color.widgettext_night) : Color.BLACK ; if(shadowColor != shadw) { shadowColor = shadw; updatextColor(textColor, shadw, rulerControl, zoomControls, mapMenuControls); diff --git a/OsmAnd/src/net/osmand/plus/views/MapInfoLayer.java b/OsmAnd/src/net/osmand/plus/views/MapInfoLayer.java index a843d242f0..8b000ba750 100644 --- a/OsmAnd/src/net/osmand/plus/views/MapInfoLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/MapInfoLayer.java @@ -388,7 +388,7 @@ public class MapInfoLayer extends OsmandMapLayer { if (themeId != calcThemeId) { themeId = calcThemeId; boolean textBold = following; - int textColor = nightMode ? 0xffC8C8C8:Color.BLACK ; + int textColor = nightMode ? view.getResources().getColor(R.color.widgettext_night):Color.BLACK ; int textShadowColor = transparent && !nightMode? Color.WHITE : Color.TRANSPARENT ; int boxTop; int boxTopStack;