Fix random red color in local map list
This commit is contained in:
parent
7fba3e4a3b
commit
dd71cb2a9c
1 changed files with 4 additions and 6 deletions
|
@ -827,9 +827,8 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment implement
|
||||||
public LocalIndexesAdapter(DownloadActivity ctx) {
|
public LocalIndexesAdapter(DownloadActivity ctx) {
|
||||||
this.ctx = ctx;
|
this.ctx = ctx;
|
||||||
warningColor = ContextCompat.getColor(ctx, R.color.color_warning);
|
warningColor = ContextCompat.getColor(ctx, R.color.color_warning);
|
||||||
okColor = ContextCompat.getColor(ctx, R.color.color_ok);
|
boolean light = ctx.getMyApplication().getSettings().isLightContent();
|
||||||
TypedArray ta = ctx.getTheme().obtainStyledAttributes(new int[]{android.R.attr.textColorPrimary});
|
okColor = ContextCompat.getColor(ctx, light ? R.color.primary_text_light : R.color.primary_text_dark);
|
||||||
ta.recycle();
|
|
||||||
corruptedColor = ContextCompat.getColor(ctx, R.color.color_invalid);
|
corruptedColor = ContextCompat.getColor(ctx, R.color.color_invalid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1108,9 +1107,8 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment implement
|
||||||
nameTextView.setTextColor(warningColor);
|
nameTextView.setTextColor(warningColor);
|
||||||
} else if (child.isCorrupted()) {
|
} else if (child.isCorrupted()) {
|
||||||
nameTextView.setTextColor(corruptedColor);
|
nameTextView.setTextColor(corruptedColor);
|
||||||
} else if (child.isLoaded()) {
|
} else {
|
||||||
// users confused okColor here with "uptodate", so let's leave white (black in dark app theme) as "isLoaded"
|
nameTextView.setTextColor(okColor);
|
||||||
//nameTextView.setTextColor(okColor);
|
|
||||||
}
|
}
|
||||||
if (child.isBackupedData()) {
|
if (child.isBackupedData()) {
|
||||||
nameTextView.setTypeface(Typeface.DEFAULT, Typeface.ITALIC);
|
nameTextView.setTypeface(Typeface.DEFAULT, Typeface.ITALIC);
|
||||||
|
|
Loading…
Reference in a new issue