Move text color to colors.xml

This commit is contained in:
sonora 2015-02-01 09:58:53 +01:00
parent a59d20d091
commit 9f08db7f39
3 changed files with 19 additions and 15 deletions

View file

@ -15,20 +15,13 @@
<color name="dashboard_subheader_text_light">#212121</color>
<color name="dashboard_general_button_dark">#ff8f00</color>
<color name="dashboard_general_button_light">#536DFE</color>
<color name="gpx_color_point">#cd2c33</color>
<color name="gpx_speed">#c79c00</color>
<color name="gpx_altitude_desc">#32CD32</color>
<color name="gpx_altitude_asc">#EE3232</color>
<color name="gpx_distance_color">#ffa500</color>
<color name="gpx_time_span_color">#0080FF</color>
<color name="background_tab_pressed">#1AFFFFFF</color>
<color name="color_transparent">#00000000</color>
<color name="color_favorite">#eecc22</color>
<color name="widgettext_night">0xffC8C8C8</color>
<!-- style colors -->
<color name="group_background">#A5A5A5</color>
<color name="background_tab_pressed">#1AFFFFFF</color>
<!-- <color name="activity_background">#666666</color> -->
<!-- Distance to object suitable for all themes -->
@ -40,6 +33,16 @@
<color name="row_selection_color">#CC33BBE0</color>
<!-- GPX analysis colors -->
<color name="gpx_color_point">#cd2c33</color>
<color name="gpx_speed">#c79c00</color>
<color name="gpx_altitude_desc">#32CD32</color>
<color name="gpx_altitude_asc">#EE3232</color>
<color name="gpx_distance_color">#ffa500</color>
<color name="gpx_time_span_color">#0080FF</color>
<color name="color_favorite">#eecc22</color>
<!-- Themed color list items -->
<!-- invalid -red, localindex not supported, -->
<color name="color_invalid">#EE3232</color>

View file

@ -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);

View file

@ -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;