tweak typography and layouts a bit
This commit is contained in:
parent
e840ebbc96
commit
8a97531a5a
@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="org.fox.ttrss"
|
||||
android:versionCode="230"
|
||||
android:versionName="1.34" >
|
||||
android:versionCode="231"
|
||||
android:versionName="1.35" >
|
||||
|
||||
<uses-sdk
|
||||
android:minSdkVersion="8"
|
||||
|
@ -1,7 +1,7 @@
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/article_fragment"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?articleBackground"
|
||||
android:padding="5sp" >
|
||||
|
||||
@ -28,46 +28,28 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:paddingTop="4dp"
|
||||
android:fontFamily="sans-serif-condensed"
|
||||
android:paddingBottom="4dp"
|
||||
android:text="My simple headline"
|
||||
android:text="My simple headline"
|
||||
android:textColor="?linkColor"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/author"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:ellipsize="end"
|
||||
android:gravity="right"
|
||||
android:singleLine="true"
|
||||
android:text="by Author"
|
||||
android:textColor="?headlineSecondaryTextColor"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/comments"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="right"
|
||||
android:fontFamily="sans-serif-light"
|
||||
android:text="24 comments"
|
||||
android:textColor="?linkColor"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_weight="0"
|
||||
android:background="?ttrssHorizontalDivider"
|
||||
android:paddingTop="2dip" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_weight="1"
|
||||
android:paddingTop="4dp"
|
||||
android:paddingBottom="4dp" >
|
||||
|
||||
<TextView
|
||||
@ -77,6 +59,7 @@
|
||||
android:layout_weight="0.5"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:fontFamily="sans-serif-light"
|
||||
android:text="Example Feed"
|
||||
android:textColor="?headlineSecondaryTextColor"
|
||||
android:textSize="12sp" />
|
||||
@ -87,10 +70,12 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.5"
|
||||
android:gravity="right"
|
||||
android:fontFamily="sans-serif-light"
|
||||
android:text="Jan 01, 12:00"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="?headlineSecondaryTextColor"
|
||||
android:textSize="12sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
@ -26,22 +26,11 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:paddingBottom="4dp"
|
||||
android:fontFamily="sans-serif-condensed"
|
||||
android:text="My simple headline"
|
||||
android:textColor="?linkColor"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/author"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:ellipsize="end"
|
||||
android:gravity="right"
|
||||
android:singleLine="true"
|
||||
android:text="by Author"
|
||||
android:textColor="?headlineSecondaryTextColor"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/comments"
|
||||
android:layout_width="match_parent"
|
||||
@ -49,18 +38,10 @@
|
||||
android:layout_weight="1"
|
||||
android:gravity="right"
|
||||
android:text="24 comments"
|
||||
android:fontFamily="sans-serif-light"
|
||||
android:textColor="?linkColor"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_weight="0"
|
||||
android:background="?ttrssHorizontalDivider"
|
||||
android:paddingTop="2dip" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@ -75,6 +56,7 @@
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:text="Example Feed"
|
||||
android:fontFamily="sans-serif-light"
|
||||
android:textColor="?headlineSecondaryTextColor"
|
||||
android:textSize="12sp" />
|
||||
|
||||
@ -85,6 +67,7 @@
|
||||
android:layout_weight="0.5"
|
||||
android:gravity="right"
|
||||
android:text="Jan 01, 12:00"
|
||||
android:fontFamily="sans-serif-light"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="?headlineSecondaryTextColor"
|
||||
android:textSize="12sp" />
|
||||
|
@ -36,6 +36,7 @@
|
||||
android:gravity="center_vertical"
|
||||
android:singleLine="false"
|
||||
android:text="Sample entry title"
|
||||
android:fontFamily="sans-serif-condensed"
|
||||
android:textColor="?headlineTextColor"
|
||||
android:textSize="18sp" />
|
||||
</LinearLayout>
|
||||
@ -58,6 +59,7 @@
|
||||
android:gravity="center_vertical"
|
||||
android:singleLine="true"
|
||||
android:text="Example Feed"
|
||||
android:fontFamily="sans-serif-light"
|
||||
android:textColor="?headlineSecondaryTextColor"
|
||||
android:textSize="12sp" />
|
||||
|
||||
@ -68,6 +70,7 @@
|
||||
android:layout_weight="1"
|
||||
android:gravity="right|center_vertical"
|
||||
android:text="Jan 01, 12:00"
|
||||
android:fontFamily="sans-serif-light"
|
||||
android:textColor="?headlineSecondaryTextColor"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
@ -102,6 +105,8 @@
|
||||
android:gravity="center_vertical"
|
||||
android:singleLine="true"
|
||||
android:text="by Author"
|
||||
android:fontFamily="sans-serif-light"
|
||||
android:textStyle="italic"
|
||||
android:textColor="?headlineSecondaryTextColor"
|
||||
android:textSize="12sp" />
|
||||
|
||||
|
@ -31,6 +31,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:fontFamily="sans-serif-condensed"
|
||||
android:gravity="center_vertical"
|
||||
android:singleLine="false"
|
||||
android:text="Sample entry title"
|
||||
@ -55,6 +56,7 @@
|
||||
android:ellipsize="end"
|
||||
android:gravity="center_vertical"
|
||||
android:singleLine="true"
|
||||
android:fontFamily="sans-serif-light"
|
||||
android:text="Example Feed"
|
||||
android:textColor="?headlineSelectedSecondaryTextColor"
|
||||
android:textSize="12sp" />
|
||||
@ -66,6 +68,7 @@
|
||||
android:layout_weight="1"
|
||||
android:gravity="right|center_vertical"
|
||||
android:text="Jan 01, 12:00"
|
||||
android:fontFamily="sans-serif-light"
|
||||
android:textColor="?headlineSelectedSecondaryTextColor"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
@ -100,6 +103,8 @@
|
||||
android:gravity="center_vertical"
|
||||
android:singleLine="true"
|
||||
android:text="by Author"
|
||||
android:fontFamily="sans-serif-light"
|
||||
android:textStyle="italic"
|
||||
android:textColor="?headlineSelectedSecondaryTextColor"
|
||||
android:textSize="12sp" />
|
||||
|
||||
|
@ -34,6 +34,7 @@
|
||||
android:gravity="center_vertical"
|
||||
android:singleLine="false"
|
||||
android:text="Sample entry title"
|
||||
android:fontFamily="sans-serif-condensed"
|
||||
android:textColor="?headlineSelectedTextColor"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
@ -57,6 +58,7 @@
|
||||
android:gravity="center_vertical"
|
||||
android:singleLine="true"
|
||||
android:text="Example Feed"
|
||||
android:fontFamily="sans-serif-light"
|
||||
android:textColor="?headlineSelectedSecondaryTextColor"
|
||||
android:textSize="12sp" />
|
||||
|
||||
@ -66,6 +68,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="right|center_vertical"
|
||||
android:fontFamily="sans-serif-light"
|
||||
android:text="Jan 01, 12:00"
|
||||
android:textColor="?headlineSelectedSecondaryTextColor"
|
||||
android:textSize="12sp" />
|
||||
@ -101,6 +104,8 @@
|
||||
android:gravity="center_vertical"
|
||||
android:singleLine="true"
|
||||
android:text="by Author"
|
||||
android:fontFamily="sans-serif-light"
|
||||
android:textStyle="italic"
|
||||
android:textColor="?headlineSelectedSecondaryTextColor"
|
||||
android:textSize="12sp" />
|
||||
|
||||
|
@ -28,6 +28,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:fontFamily="sans-serif-condensed"
|
||||
android:gravity="center_vertical"
|
||||
android:singleLine="false"
|
||||
android:text="Sample entry title"
|
||||
@ -53,15 +54,17 @@
|
||||
android:ellipsize="end"
|
||||
android:gravity="center_vertical"
|
||||
android:singleLine="true"
|
||||
android:text="Example Feed"
|
||||
android:fontFamily="sans-serif-light"
|
||||
android:text="Example Feed"
|
||||
android:textColor="?headlineSecondaryTextColor"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/date"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:fontFamily="sans-serif-light"
|
||||
android:gravity="right|center_vertical"
|
||||
android:text="Jan 01, 12:00"
|
||||
android:textColor="?headlineSecondaryTextColor"
|
||||
@ -98,6 +101,8 @@
|
||||
android:gravity="center_vertical"
|
||||
android:singleLine="true"
|
||||
android:text="by Author"
|
||||
android:fontFamily="sans-serif-light"
|
||||
android:textStyle="italic"
|
||||
android:textColor="?headlineSecondaryTextColor"
|
||||
android:textSize="12sp" />
|
||||
|
||||
|
@ -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;
|
||||
|
@ -327,29 +327,42 @@ public class OfflineArticleFragment extends Fragment {
|
||||
DateFormat df = new SimpleDateFormat("MMM dd, HH:mm");
|
||||
dv.setText(df.format(d));
|
||||
}
|
||||
|
||||
TextView tagv = (TextView)view.findViewById(R.id.tags);
|
||||
|
||||
if (tagv != null) {
|
||||
int feedTitleIndex = m_cursor.getColumnIndex("feed_title");
|
||||
|
||||
if (feedTitleIndex != -1 && m_isCat) {
|
||||
tagv.setText(m_cursor.getString(feedTitleIndex));
|
||||
} else {
|
||||
String tagsStr = m_cursor.getString(m_cursor.getColumnIndex("tags"));
|
||||
tagv.setText(tagsStr);
|
||||
}
|
||||
}
|
||||
|
||||
TextView author = (TextView)view.findViewById(R.id.author);
|
||||
|
||||
boolean hasAuthor = false;
|
||||
|
||||
if (author != null) {
|
||||
int authorIndex = m_cursor.getColumnIndex("author");
|
||||
if (authorIndex >= 0)
|
||||
author.setText(m_cursor.getString(authorIndex));
|
||||
else
|
||||
author.setVisibility(View.GONE);
|
||||
|
||||
hasAuthor = true;
|
||||
}
|
||||
|
||||
TextView tagv = (TextView)view.findViewById(R.id.tags);
|
||||
|
||||
if (tagv != null) {
|
||||
int feedTitleIndex = m_cursor.getColumnIndex("feed_title");
|
||||
|
||||
if (feedTitleIndex != -1 /* && m_isCat */) {
|
||||
String fTitle = m_cursor.getString(feedTitleIndex);
|
||||
|
||||
int authorIndex = m_cursor.getColumnIndex("author");
|
||||
|
||||
if (!hasAuthor && authorIndex >= 0) {
|
||||
fTitle += " (" + getString(R.string.author_formatted, m_cursor.getString(authorIndex)) + ")";
|
||||
}
|
||||
|
||||
tagv.setText(fTitle);
|
||||
} else {
|
||||
String tagsStr = m_cursor.getString(m_cursor.getColumnIndex("tags"));
|
||||
tagv.setText(tagsStr);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return view;
|
||||
|
Loading…
Reference in New Issue
Block a user