summaryrefslogtreecommitdiff
path: root/src/org/fox/ttrss/ArticleFragment.java
diff options
context:
space:
mode:
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>2014-01-24 13:41:37 +0400
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>2014-01-24 13:41:37 +0400
commit8a97531a5a1d2e013db08b7fbef0eb2cd10baaf9 (patch)
tree97dc743ac00a46be77d00d3bdebad4795a533ce7 /src/org/fox/ttrss/ArticleFragment.java
parente840ebbc96d080b0d0ef278ba74461dbd3b0a5c2 (diff)
tweak typography and layouts a bit
Diffstat (limited to 'src/org/fox/ttrss/ArticleFragment.java')
-rw-r--r--src/org/fox/ttrss/ArticleFragment.java30
1 files changed, 20 insertions, 10 deletions
diff --git a/src/org/fox/ttrss/ArticleFragment.java b/src/org/fox/ttrss/ArticleFragment.java
index d7791d83..96c119d9 100644
--- a/src/org/fox/ttrss/ArticleFragment.java
+++ b/src/org/fox/ttrss/ArticleFragment.java
@@ -333,12 +333,31 @@ public class ArticleFragment extends Fragment {
DateFormat df = new SimpleDateFormat("MMM dd, HH:mm");
dv.setText(df.format(d));
}
+
+ TextView author = (TextView)view.findViewById(R.id.author);
+
+ boolean hasAuthor = false;
+ if (author != null) {
+ if (m_article.author != null && m_article.author.length() > 0) {
+ author.setText(getString(R.string.author_formatted, m_article.author));
+ } else {
+ author.setVisibility(View.GONE);
+ }
+ hasAuthor = true;
+ }
+
TextView tagv = (TextView)view.findViewById(R.id.tags);
if (tagv != null) {
if (m_article.feed_title != null) {
- tagv.setText(m_article.feed_title);
+ String fTitle = m_article.feed_title;
+
+ if (!hasAuthor && m_article.author != null && m_article.author.length() > 0) {
+ fTitle += " (" + getString(R.string.author_formatted, m_article.author) + ")";
+ }
+
+ tagv.setText(fTitle);
} else if (m_article.tags != null) {
String tagsStr = "";
@@ -353,15 +372,6 @@ public class ArticleFragment extends Fragment {
}
}
- TextView author = (TextView)view.findViewById(R.id.author);
-
- if (author != null) {
- if (m_article.author != null && m_article.author.length() > 0) {
- author.setText(getString(R.string.author_formatted, m_article.author));
- } else {
- author.setVisibility(View.GONE);
- }
- }
}
return view;