allow longer titles in article view

This commit is contained in:
Andrew Dolgov 2011-11-30 12:02:26 +03:00
parent bc688118d2
commit bb0438358d
2 changed files with 10 additions and 4 deletions

View File

@ -65,9 +65,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:ellipsize="end"
android:singleLine="true"
android:text="{Title}"
android:text="There are many variations of passages of Lorem Ipsum available"
/>
<LinearLayout

View File

@ -83,8 +83,16 @@ public class ArticleFragment extends Fragment implements OnClickListener {
TextView title = (TextView)view.findViewById(R.id.title);
if (title != null) {
String titleStr;
if (m_article.title.length() > 200)
titleStr = m_article.title.substring(0, 200) + "...";
else
titleStr = m_article.title;
title.setMovementMethod(LinkMovementMethod.getInstance());
title.setText(Html.fromHtml("<a href=\""+m_article.link.replace("\"", "\\\"")+"\">" + m_article.title + "</a>"));
title.setText(Html.fromHtml("<a href=\""+m_article.link.replace("\"", "\\\"")+"\">" + titleStr + "</a>"));
}
WebView web = (WebView)view.findViewById(R.id.content);