support showing article author (requires api 5)

bump version
This commit is contained in:
Andrew Dolgov 2013-03-30 19:30:47 +04:00
parent f7c533d5d9
commit 5792022b55
21 changed files with 424 additions and 103 deletions

View File

@ -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="150"
android:versionName="1.4.2" >
android:versionCode="151"
android:versionName="1.4.3" >
<uses-sdk
android:minSdkVersion="8"
@ -44,10 +44,6 @@
android:name=".CommonActivity"
android:label="@string/app_name" >
</activity>
<activity
android:name=".ArticleActivity"
android:label="@string/app_name" >
</activity>
<activity
android:name=".offline.OfflineActivity"
android:label="@string/app_name" >

View File

@ -27,17 +27,35 @@
android:textSize="16sp"
android:textStyle="bold" />
<TextView
android:id="@+id/feed_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0"
android:ellipsize="end"
android:gravity="right"
android:singleLine="true"
android:text="{Feed title...}"
android:textColor="?headlineExcerptTextColor"
android:textSize="10sp" />
<LinearLayout
android:id="@+id/feed_and_author"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView
android:id="@+id/feed_title"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:ellipsize="end"
android:layout_weight="0.5"
android:singleLine="true"
android:text="{Feed title...}"
android:textColor="?headlineExcerptTextColor"
android:textSize="10sp" />
<TextView
android:id="@+id/author"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="0.5"
android:ellipsize="end"
android:gravity="right"
android:singleLine="true"
android:text="{Author}"
android:textColor="?headlineExcerptTextColor"
android:textSize="10sp" />
</LinearLayout>
<TextView
android:id="@+id/excerpt"

View File

@ -26,17 +26,35 @@
android:textSize="16sp"
android:textStyle="normal" />
<TextView
android:id="@+id/feed_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0"
android:ellipsize="end"
android:gravity="right"
android:singleLine="true"
android:text="{Feed title...}"
android:textColor="?headlineSelectedExcerptTextColor"
android:textSize="10sp" />
<LinearLayout
android:id="@+id/feed_and_author"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView
android:id="@+id/feed_title"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:ellipsize="end"
android:layout_weight="0.5"
android:singleLine="true"
android:text="{Feed title...}"
android:textColor="?headlineExcerptTextColor"
android:textSize="10sp" />
<TextView
android:id="@+id/author"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="0.5"
android:ellipsize="end"
android:gravity="right"
android:singleLine="true"
android:text="{Author}"
android:textColor="?headlineExcerptTextColor"
android:textSize="10sp" />
</LinearLayout>
<TextView
android:id="@+id/excerpt"

View File

@ -27,17 +27,35 @@
android:textSize="16sp"
android:textStyle="bold" />
<TextView
android:id="@+id/feed_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0"
android:ellipsize="end"
android:gravity="right"
android:singleLine="true"
android:text="{Feed title...}"
android:textColor="?headlineSelectedExcerptTextColor"
android:textSize="10sp" />
<LinearLayout
android:id="@+id/feed_and_author"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView
android:id="@+id/feed_title"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:ellipsize="end"
android:layout_weight="0.5"
android:singleLine="true"
android:text="{Feed title...}"
android:textColor="?headlineExcerptTextColor"
android:textSize="10sp" />
<TextView
android:id="@+id/author"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="0.5"
android:ellipsize="end"
android:gravity="right"
android:singleLine="true"
android:text="{Author}"
android:textColor="?headlineExcerptTextColor"
android:textSize="10sp" />
</LinearLayout>
<TextView
android:id="@+id/excerpt"

View File

@ -27,17 +27,35 @@
android:textSize="16sp"
android:textStyle="bold" />
<TextView
android:id="@+id/feed_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0"
android:ellipsize="end"
android:gravity="right"
android:singleLine="true"
android:text="{Feed title...}"
android:textColor="?headlineExcerptTextColor"
android:textSize="10sp" />
<LinearLayout
android:id="@+id/feed_and_author"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView
android:id="@+id/feed_title"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:ellipsize="end"
android:layout_weight="0.5"
android:singleLine="true"
android:text="{Feed title...}"
android:textColor="?headlineExcerptTextColor"
android:textSize="10sp" />
<TextView
android:id="@+id/author"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="0.5"
android:ellipsize="end"
android:gravity="right"
android:singleLine="true"
android:text="{Author}"
android:textColor="?headlineExcerptTextColor"
android:textSize="10sp" />
</LinearLayout>
<TextView
android:id="@+id/excerpt"

View File

@ -44,6 +44,36 @@
</TextView>
<LinearLayout
android:id="@+id/feed_and_author"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView
android:id="@+id/feed_title"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:ellipsize="end"
android:layout_weight="0.5"
android:singleLine="true"
android:text="{Feed title...}"
android:textColor="?headlineExcerptTextColor"
android:textSize="10sp" />
<TextView
android:id="@+id/author"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="0.5"
android:ellipsize="end"
android:gravity="right"
android:singleLine="true"
android:text="{Author}"
android:textColor="?headlineExcerptTextColor"
android:textSize="10sp" />
</LinearLayout>
<TextView
android:id="@+id/excerpt"
android:layout_width="match_parent"

View File

@ -42,6 +42,36 @@
android:textStyle="normal" >
</TextView>
<LinearLayout
android:id="@+id/feed_and_author"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView
android:id="@+id/feed_title"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:ellipsize="end"
android:layout_weight="0.5"
android:singleLine="true"
android:text="{Feed title...}"
android:textColor="?headlineExcerptTextColor"
android:textSize="10sp" />
<TextView
android:id="@+id/author"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="0.5"
android:ellipsize="end"
android:gravity="right"
android:singleLine="true"
android:text="{Author}"
android:textColor="?headlineExcerptTextColor"
android:textSize="10sp" />
</LinearLayout>
<TextView
android:id="@+id/excerpt"
android:layout_width="match_parent"

View File

@ -42,6 +42,36 @@
android:textStyle="bold" >
</TextView>
<LinearLayout
android:id="@+id/feed_and_author"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView
android:id="@+id/feed_title"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:ellipsize="end"
android:layout_weight="0.5"
android:singleLine="true"
android:text="{Feed title...}"
android:textColor="?headlineExcerptTextColor"
android:textSize="10sp" />
<TextView
android:id="@+id/author"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="0.5"
android:ellipsize="end"
android:gravity="right"
android:singleLine="true"
android:text="{Author}"
android:textColor="?headlineExcerptTextColor"
android:textSize="10sp" />
</LinearLayout>
<TextView
android:id="@+id/excerpt"
android:layout_width="match_parent"

View File

@ -44,6 +44,36 @@
</TextView>
<LinearLayout
android:id="@+id/feed_and_author"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView
android:id="@+id/feed_title"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:ellipsize="end"
android:layout_weight="0.5"
android:singleLine="true"
android:text="{Feed title...}"
android:textColor="?headlineExcerptTextColor"
android:textSize="10sp" />
<TextView
android:id="@+id/author"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="0.5"
android:ellipsize="end"
android:gravity="right"
android:singleLine="true"
android:text="{Author}"
android:textColor="?headlineExcerptTextColor"
android:textSize="10sp" />
</LinearLayout>
<TextView
android:id="@+id/excerpt"
android:layout_width="match_parent"

View File

@ -36,6 +36,20 @@
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:singleLine="true"
android:gravity="right"
android:textStyle="italic"
android:text="{Author}"
android:textColor="?headlineExcerptTextColor"
android:textSize="13sp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"

View File

@ -22,7 +22,6 @@
android:paddingRight="6dip" >
</CheckBox>
<LinearLayout
android:id="@+id/linearLayout1"
android:layout_width="match_parent"
@ -31,7 +30,6 @@
android:orientation="vertical"
android:padding="3dp" >
<TextView
android:id="@+id/title"
android:layout_width="match_parent"
@ -42,19 +40,37 @@
android:textColor="?headlineTextColor"
android:textSize="16sp"
android:textStyle="bold" >
</TextView>
<TextView
android:id="@+id/feed_title"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:ellipsize="end"
android:gravity="center_horizontal"
android:singleLine="true"
android:text="{Feed title...}"
android:textColor="?headlineExcerptTextColor"
android:textSize="10sp" />
<LinearLayout
android:id="@+id/feed_and_author"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView
android:id="@+id/feed_title"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:ellipsize="end"
android:layout_weight="0.5"
android:singleLine="true"
android:text="{Feed title...}"
android:textColor="?headlineExcerptTextColor"
android:textSize="10sp" />
<TextView
android:id="@+id/author"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="0.5"
android:ellipsize="end"
android:gravity="right"
android:singleLine="true"
android:text="{Author}"
android:textColor="?headlineExcerptTextColor"
android:textSize="10sp" />
</LinearLayout>
<TextView
android:id="@+id/excerpt"
@ -65,7 +81,6 @@
android:textSize="13sp" >
</TextView>
<TextView
android:id="@+id/date"
android:layout_width="wrap_content"
@ -75,11 +90,8 @@
android:textColor="?headlineExcerptTextColor"
android:textSize="10sp"
android:textStyle="italic" />
</LinearLayout>
<LinearLayout
android:id="@+id/linearLayout4"
android:layout_width="wrap_content"

View File

@ -8,6 +8,7 @@
android:padding="5dp"
android:orientation="horizontal" >
<ProgressBar
android:id="@+id/loadmore_progress"
style="?android:attr/progressBarStyleSmall"

View File

@ -45,16 +45,35 @@
</TextView>
<TextView
android:id="@+id/feed_title"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:ellipsize="end"
android:gravity="center_horizontal|right"
android:singleLine="true"
android:text="{Feed title...}"
android:textColor="?headlineSelectedExcerptTextColor"
android:textSize="10sp" />
<LinearLayout
android:id="@+id/feed_and_author"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView
android:id="@+id/feed_title"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:ellipsize="end"
android:layout_weight="0.5"
android:singleLine="true"
android:text="{Feed title...}"
android:textColor="?headlineExcerptTextColor"
android:textSize="10sp" />
<TextView
android:id="@+id/author"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="0.5"
android:ellipsize="end"
android:gravity="right"
android:singleLine="true"
android:text="{Author}"
android:textColor="?headlineExcerptTextColor"
android:textSize="10sp" />
</LinearLayout>
<TextView
android:id="@+id/excerpt"

View File

@ -45,16 +45,35 @@
</TextView>
<TextView
android:id="@+id/feed_title"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:ellipsize="end"
android:gravity="center_horizontal|right"
android:singleLine="true"
android:text="{Feed title...}"
android:textColor="?headlineSelectedExcerptTextColor"
android:textSize="10sp" />
<LinearLayout
android:id="@+id/feed_and_author"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView
android:id="@+id/feed_title"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:ellipsize="end"
android:layout_weight="0.5"
android:singleLine="true"
android:text="{Feed title...}"
android:textColor="?headlineExcerptTextColor"
android:textSize="10sp" />
<TextView
android:id="@+id/author"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="0.5"
android:ellipsize="end"
android:gravity="right"
android:singleLine="true"
android:text="{Author}"
android:textColor="?headlineExcerptTextColor"
android:textSize="10sp" />
</LinearLayout>
<TextView
android:id="@+id/excerpt"

View File

@ -47,16 +47,54 @@
</TextView>
<TextView
android:id="@+id/feed_title"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:ellipsize="end"
android:gravity="center_horizontal"
android:singleLine="true"
android:text="{Feed title...}"
android:textColor="?headlineExcerptTextColor"
android:textSize="10sp" />
<LinearLayout
android:id="@+id/feed_and_author"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<LinearLayout
android:id="@+id/feed_and_author"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView
android:id="@+id/feed_title"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:ellipsize="end"
android:layout_weight="0.5"
android:singleLine="true"
android:text="{Feed title...}"
android:textColor="?headlineExcerptTextColor"
android:textSize="10sp" />
<TextView
android:id="@+id/author"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="0.5"
android:ellipsize="end"
android:gravity="right"
android:singleLine="true"
android:text="{Author}"
android:textColor="?headlineExcerptTextColor"
android:textSize="10sp" />
</LinearLayout>
<TextView
android:id="@+id/author"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="0.5"
android:ellipsize="end"
android:gravity="right"
android:singleLine="true"
android:text="{Author}"
android:textColor="?headlineExcerptTextColor"
android:textSize="10sp" />
</LinearLayout>
<TextView
android:id="@+id/excerpt"

View File

@ -3,6 +3,7 @@
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<ProgressBar
android:id="@+id/progressBar1"
style="?android:attr/progressBarStyleLarge"

View File

@ -26,6 +26,7 @@
android:hint="@string/share_url_hint"
android:singleLine="true" />
<EditText
android:id="@+id/content"
android:layout_width="wrap_content"
@ -41,6 +42,7 @@
<requestFocus />
</EditText>
<Button
android:id="@+id/share_button"
android:layout_width="100dp"

View File

@ -292,6 +292,16 @@ public class ArticleFragment extends Fragment implements GestureDetector.OnDoubl
tagv.setVisibility(View.GONE);
}
}
TextView author = (TextView)view.findViewById(R.id.author);
if (author != null) {
if (m_article.author != null && m_article.author.length() > 0) {
author.setText(m_article.author);
} else {
author.setVisibility(View.GONE);
}
}
}
return view;

View File

@ -664,6 +664,14 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
}
}
String articleAuthor = article.author != null ? article.author : "";
TextView author = (TextView)v.findViewById(R.id.author);
if (author != null) {
author.setText(articleAuthor);
}
/* ImageView separator = (ImageView)v.findViewById(R.id.headlines_separator);
if (separator != null && m_onlineServices.isSmallScreen()) {

View File

@ -280,6 +280,12 @@ public class OfflineArticleFragment extends Fragment implements GestureDetector.
tagv.setText(tagsStr);
}
}
TextView author = (TextView)view.findViewById(R.id.author);
if (author != null) {
author.setVisibility(View.GONE);
}
}
return view;

View File

@ -25,6 +25,7 @@ public class Article implements Parcelable {
public int comments_count;
public String comments_link;
public boolean always_display_attachments;
public String author;
public Article(Parcel in) {
readFromParcel(in);
@ -64,6 +65,7 @@ public class Article implements Parcelable {
out.writeInt(comments_count);
out.writeString(comments_link);
out.writeInt(always_display_attachments ? 1 : 0);
out.writeString(author);
}
public void readFromParcel(Parcel in) {
@ -90,6 +92,7 @@ public class Article implements Parcelable {
comments_count = in.readInt();
comments_link = in.readString();
always_display_attachments = in.readInt() == 1;
author = in.readString();
}
@SuppressWarnings("rawtypes")