diff options
author | Andrew Dolgov <[email protected]> | 2014-11-13 22:02:59 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2014-11-13 22:02:59 +0300 |
commit | a30364872cd1491880b6c8ad9796de468cc18501 (patch) | |
tree | 7663cfd394d51aaf629b30b0f9b94671af592a5b /org.fox.ttrss/src/main/java | |
parent | 57942e84e3b5470e3b9ddc68878759793ed769dc (diff) |
use maxlines to limit excerpt size instead of manual ellipsizing
Diffstat (limited to 'org.fox.ttrss/src/main/java')
3 files changed, 1 insertions, 10 deletions
diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/CommonActivity.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/CommonActivity.java index b2765dc0..81907743 100644 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/CommonActivity.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/CommonActivity.java @@ -31,9 +31,7 @@ public class CommonActivity extends ActionBarActivity { public final static String THEME_SEPIA = "THEME_SEPIA"; public final static String THEME_AMBER = "THEME_AMBER"; public final static String THEME_DEFAULT = CommonActivity.THEME_LIGHT; - - public static final int EXCERPT_MAX_SIZE = 200; - + private SQLiteDatabase m_readableDb; private SQLiteDatabase m_writableDb; diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java index 2d0ddb22..b17dd02e 100644 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/HeadlinesFragment.java @@ -795,9 +795,6 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener, } else { String excerpt = Jsoup.parse(articleContent).text(); - if (excerpt.length() > CommonActivity.EXCERPT_MAX_SIZE) - excerpt = excerpt.substring(0, CommonActivity.EXCERPT_MAX_SIZE) + "..."; - holder.excerptView.setTextSize(TypedValue.COMPLEX_UNIT_SP, headlineFontSize); holder.excerptView.setText(excerpt); } diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineHeadlinesFragment.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineHeadlinesFragment.java index c7f9be13..0b8ec6c1 100644 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineHeadlinesFragment.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineHeadlinesFragment.java @@ -36,7 +36,6 @@ import android.widget.ListView; import android.widget.ProgressBar; import android.widget.TextView; -import org.fox.ttrss.CommonActivity; import org.fox.ttrss.GlobalState; import org.fox.ttrss.R; import org.fox.ttrss.util.TypefaceCache; @@ -647,9 +646,6 @@ public class OfflineHeadlinesFragment extends Fragment implements OnItemClickLis } else { String excerpt = Jsoup.parse(article.getString(article.getColumnIndex("content"))).text(); - if (excerpt.length() > CommonActivity.EXCERPT_MAX_SIZE) - excerpt = excerpt.substring(0, CommonActivity.EXCERPT_MAX_SIZE) + "..."; - holder.excerptView.setTextSize(TypedValue.COMPLEX_UNIT_SP, headlineFontSize); holder.excerptView.setText(excerpt); } |