From 116f9ca8d9d1ce2dac5339e52e86936da213a030 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 27 May 2013 14:37:42 +0400 Subject: [PATCH] add a headline text size preference --- res/values/strings.xml | 1 + res/xml/preferences.xml | 17 +++++++++++------ src/org/fox/ttrss/HeadlinesFragment.java | 15 +++++++++++++++ 3 files changed, 27 insertions(+), 6 deletions(-) diff --git a/res/values/strings.xml b/res/values/strings.xml index ec1331d3..a05188d8 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -199,4 +199,5 @@ Confirm marking articles as read by %1$s %1$d unread articles + Headline text size diff --git a/res/xml/preferences.xml b/res/xml/preferences.xml index 6bfa0e29..b098b394 100644 --- a/res/xml/preferences.xml +++ b/res/xml/preferences.xml @@ -97,11 +97,18 @@ android:key="oldest_first" android:summary="@string/requires_api5" android:title="@string/offline_oldest_first" /> - - + android:title="@string/pref_headlines_mark_read_scroll" /> + + - - 200) excerpt = excerpt.substring(0, 200) + "..."; + + int fontSize = -1; + switch (Integer.parseInt(m_prefs.getString("headlines_font_size", "0"))) { + case 0: + fontSize = 13; + break; + case 1: + fontSize = 16; + break; + case 2: + fontSize = 18; + break; + } + + te.setTextSize(TypedValue.COMPLEX_UNIT_SP, fontSize); te.setText(excerpt); } }