allow longer titles in article view
This commit is contained in:
parent
bc688118d2
commit
bb0438358d
@ -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
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user