From 73328e0d6595a06e9fba7a6ec80675e8b2eec9b5 Mon Sep 17 00:00:00 2001 From: PavelRatushny Date: Wed, 27 Dec 2017 15:33:20 +0200 Subject: [PATCH] Change article text color --- .../osmand/plus/mapcontextmenu/WikipediaDialogFragment.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/WikipediaDialogFragment.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/WikipediaDialogFragment.java index 292082ab93..49c4cacc58 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/WikipediaDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/WikipediaDialogFragment.java @@ -20,6 +20,7 @@ import android.text.Html; import android.text.Spannable; import android.text.SpannableString; import android.text.TextUtils; +import android.text.style.ForegroundColorSpan; import android.text.style.RelativeSizeSpan; import android.view.Gravity; import android.view.LayoutInflater; @@ -207,6 +208,8 @@ public class WikipediaDialogFragment extends DialogFragment { Spannable spannableContent = new SpannableString(Html.fromHtml(content)); int length = spannableContent.length(); spannableContent.setSpan(new RelativeSizeSpan(1.2f), 0, length, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); + int contentTextColor = ContextCompat.getColor(getContext(), darkMode ? R.color.ctx_menu_bottom_view_text_color_dark : R.color.ctx_menu_bottom_view_text_color_light); + spannableContent.setSpan(new ForegroundColorSpan(contentTextColor), 0, length, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); articleTextView.setText(spannableContent); } }