From bac9180bc06c5ca195c472ce517c505854a3bf33 Mon Sep 17 00:00:00 2001 From: PavelRatushny Date: Wed, 27 Dec 2017 12:14:21 +0200 Subject: [PATCH] Increase wikipedia article font size --- .../plus/mapcontextmenu/WikipediaDialogFragment.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/WikipediaDialogFragment.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/WikipediaDialogFragment.java index f33b84be19..c52f52e434 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/WikipediaDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/WikipediaDialogFragment.java @@ -15,7 +15,12 @@ import android.support.v4.content.ContextCompat; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.PopupMenu; import android.text.Html; +import android.text.Spannable; +import android.text.SpannableString; +import android.text.Spanned; import android.text.TextUtils; +import android.text.style.ForegroundColorSpan; +import android.text.style.RelativeSizeSpan; import android.view.Gravity; import android.view.LayoutInflater; import android.view.MenuItem; @@ -202,7 +207,10 @@ public class WikipediaDialogFragment extends DialogFragment { String content = amenity.getDescription(langSelected); TextView articleTextView = (TextView) mainView.findViewById(R.id.content); - articleTextView.setText(Html.fromHtml(content)); + Spannable spannableContent = new SpannableString(Html.fromHtml(content)); + int length = spannableContent.length(); + spannableContent.setSpan(new RelativeSizeSpan(1.2f), 0, length, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); + articleTextView.setText(spannableContent); } }