improve previous a bit
This commit is contained in:
parent
0615634ce1
commit
216f7e2653
@ -844,14 +844,16 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
|
|||||||
|
|
||||||
if (m_activity.getApiLevel() >= 11) {
|
if (m_activity.getApiLevel() >= 11) {
|
||||||
excerpt = article.excerpt != null ? article.excerpt : "";
|
excerpt = article.excerpt != null ? article.excerpt : "";
|
||||||
excerpt = excerpt.replace("…", "");
|
excerpt = excerpt.replace("…", "…");
|
||||||
|
excerpt = excerpt.replace("]]>", "");
|
||||||
|
excerpt = Jsoup.parse(excerpt).text();
|
||||||
} else {
|
} else {
|
||||||
excerpt = articleDoc.text();
|
excerpt = articleDoc.text();
|
||||||
|
|
||||||
|
if (excerpt.length() > CommonActivity.EXCERPT_MAX_LENGTH)
|
||||||
|
excerpt = excerpt.substring(0, CommonActivity.EXCERPT_MAX_LENGTH) + "…";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (excerpt.length() > CommonActivity.EXCERPT_MAX_LENGTH)
|
|
||||||
excerpt = excerpt.substring(0, CommonActivity.EXCERPT_MAX_LENGTH) + "…";
|
|
||||||
|
|
||||||
holder.excerptView.setTextSize(TypedValue.COMPLEX_UNIT_SP, headlineFontSize);
|
holder.excerptView.setTextSize(TypedValue.COMPLEX_UNIT_SP, headlineFontSize);
|
||||||
holder.excerptView.setText(excerpt);
|
holder.excerptView.setText(excerpt);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user