From dd71cb2a9c650fe70277bd88cfb5d71af2231d6f Mon Sep 17 00:00:00 2001 From: Alexey Kulish Date: Sat, 29 Apr 2017 15:43:22 +0300 Subject: [PATCH] Fix random red color in local map list --- .../osmand/plus/download/ui/LocalIndexesFragment.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/download/ui/LocalIndexesFragment.java b/OsmAnd/src/net/osmand/plus/download/ui/LocalIndexesFragment.java index 2115f507d6..08b2f025b7 100644 --- a/OsmAnd/src/net/osmand/plus/download/ui/LocalIndexesFragment.java +++ b/OsmAnd/src/net/osmand/plus/download/ui/LocalIndexesFragment.java @@ -827,9 +827,8 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment implement public LocalIndexesAdapter(DownloadActivity ctx) { this.ctx = ctx; warningColor = ContextCompat.getColor(ctx, R.color.color_warning); - okColor = ContextCompat.getColor(ctx, R.color.color_ok); - TypedArray ta = ctx.getTheme().obtainStyledAttributes(new int[]{android.R.attr.textColorPrimary}); - ta.recycle(); + boolean light = ctx.getMyApplication().getSettings().isLightContent(); + okColor = ContextCompat.getColor(ctx, light ? R.color.primary_text_light : R.color.primary_text_dark); corruptedColor = ContextCompat.getColor(ctx, R.color.color_invalid); } @@ -1108,9 +1107,8 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment implement nameTextView.setTextColor(warningColor); } else if (child.isCorrupted()) { nameTextView.setTextColor(corruptedColor); - } else if (child.isLoaded()) { - // users confused okColor here with "uptodate", so let's leave white (black in dark app theme) as "isLoaded" - //nameTextView.setTextColor(okColor); + } else { + nameTextView.setTextColor(okColor); } if (child.isBackupedData()) { nameTextView.setTypeface(Typeface.DEFAULT, Typeface.ITALIC);