update articlefragment style

This commit is contained in:
Andrew Dolgov 2013-05-23 15:15:23 +04:00
parent 64c9467534
commit 2f428e843e
5 changed files with 77 additions and 182 deletions

View File

@ -1,103 +0,0 @@
<LinearLayout 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:background="?articleBackground"
android:orientation="vertical"
android:padding="10sp" >
<org.fox.ttrss.TitleWebView
android:id="@+id/content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1" >
<LinearLayout
android:id="@+id/article_header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0"
android:orientation="vertical"
android:paddingBottom="4sp" >
<TextView
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="There are many variations of passages of Lorem Ipsum available"
android:textColor="?linkColor"
android:textSize="21sp" />
<LinearLayout
android:id="@+id/comments_and_author"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" >
<TextView
android:id="@+id/comments"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:paddingBottom="2sp"
android:paddingTop="2sp"
android:text="24 comments"
android:textColor="?linkColor"
android:textSize="13sp" />
<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="{Author}"
android:textColor="?headlineExcerptTextColor"
android:textSize="13sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1" >
<TextView
android:id="@+id/tags"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0.7"
android:ellipsize="end"
android:textStyle="italic"
android:singleLine="true"
android:text="{TAGS}"
android:textColor="?headlineExcerptTextColor"
android:textSize="13sp" />
<TextView
android:id="@+id/date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0.2"
android:gravity="right"
android:text="{DATE}"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="?headlineExcerptTextColor"
android:textSize="13sp"
android:textStyle="italic" />
</LinearLayout>
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5sp"
android:layout_marginTop="5sp"
android:layout_weight="0"
android:background="?ttrssHorizontalDivider"
android:paddingTop="2dip" />
</LinearLayout>
</org.fox.ttrss.TitleWebView>
</LinearLayout>

View File

@ -1,4 +1,4 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/article_fragment" android:id="@+id/article_fragment"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:layout_height="fill_parent"
@ -10,90 +10,87 @@
android:id="@+id/content" android:id="@+id/content"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="1" > android:layout_weight="1">
<LinearLayout <LinearLayout
android:id="@+id/article_header" android:id="@+id/article_header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0"
android:orientation="vertical"
android:paddingBottom="2dp" >
<TextView
android:id="@+id/title"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1"
android:paddingBottom="4dp"
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="14sp" />
<TextView
android:id="@+id/comments"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
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:layout_weight="0"
android:orientation="vertical" > android:background="?ttrssHorizontalDivider"
android:paddingTop="2dip" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="4dp"
android:layout_weight="1" >
<TextView <TextView
android:id="@+id/title" android:id="@+id/tags"
android:layout_width="match_parent" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="0.5"
android:text="There are many variations of passages of Lorem Ipsum available" android:ellipsize="end"
android:textColor="?linkColor" android:singleLine="true"
android:textSize="16sp" /> android:text="Example Feed"
android:textColor="?headlineSecondaryTextColor"
android:textSize="12sp" />
<LinearLayout <TextView
android:id="@+id/comments_and_author" android:id="@+id/date"
android:layout_width="match_parent" android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="horizontal" >
<TextView
android:id="@+id/comments"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="24 comments"
android:textColor="?linkColor"
android:textSize="13sp" />
<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="{Author}"
android:textColor="?headlineExcerptTextColor"
android:textSize="13sp"
android:textStyle="italic" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" > android:layout_weight="0.5"
android:gravity="right"
<TextView android:text="Jan 01, 12:00"
android:id="@+id/tags" android:textAppearance="?android:attr/textAppearanceSmall"
android:layout_width="wrap_content" android:textColor="?headlineSecondaryTextColor"
android:layout_height="wrap_content" android:textSize="12sp" />
android:layout_weight="0.7"
android:ellipsize="end"
android:singleLine="true"
android:text="{TAGS}"
android:textColor="?headlineExcerptTextColor"
android:textSize="13sp" />
<TextView
android:id="@+id/date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0.2"
android:gravity="right"
android:text="{DATE}"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="?headlineExcerptTextColor"
android:textSize="13sp"
android:textStyle="italic" />
</LinearLayout>
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5sp"
android:layout_weight="0"
android:background="?ttrssHorizontalDivider"
android:paddingTop="2dip" />
</LinearLayout> </LinearLayout>
</org.fox.ttrss.TitleWebView> </LinearLayout>
</FrameLayout>
</org.fox.ttrss.TitleWebView>
</LinearLayout>

View File

@ -197,4 +197,5 @@
<string name="pref_headlines_mark_read_scroll_long">Headlines will be marked read when scrolling past them</string> <string name="pref_headlines_mark_read_scroll_long">Headlines will be marked read when scrolling past them</string>
<string name="mark_num_headlines_as_read">Mark %1$d article(s) as read?</string> <string name="mark_num_headlines_as_read">Mark %1$d article(s) as read?</string>
<string name="prefs_confirm_headlines_catchup">Confirm marking articles as read</string> <string name="prefs_confirm_headlines_catchup">Confirm marking articles as read</string>
<string name="author_formatted">by %1$s</string>
</resources> </resources>

View File

@ -334,7 +334,7 @@ public class ArticleFragment extends Fragment implements GestureDetector.OnDoubl
if (author != null) { if (author != null) {
if (m_article.author != null && m_article.author.length() > 0) { if (m_article.author != null && m_article.author.length() > 0) {
author.setText(m_article.author); author.setText(getString(R.string.author_formatted, m_article.author));
} else { } else {
author.setVisibility(View.GONE); author.setVisibility(View.GONE);
} }

View File

@ -680,7 +680,7 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
TextView author = (TextView)v.findViewById(R.id.author); TextView author = (TextView)v.findViewById(R.id.author);
if (author != null) { if (author != null) {
author.setText(articleAuthor); author.setText(getString(R.string.author_formatted, articleAuthor));
} }
/* ImageView separator = (ImageView)v.findViewById(R.id.headlines_separator); /* ImageView separator = (ImageView)v.findViewById(R.id.headlines_separator);