summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--res/layout/external_itemlist_item.xml39
-rw-r--r--res/layout/feeditemlist_header.xml2
-rw-r--r--res/layout/feedlist_item.xml9
-rw-r--r--res/values/colors.xml1
-rw-r--r--res/values/dimens.xml2
-rw-r--r--src/de/danoeh/antennapod/adapter/ExternalEpisodesListAdapter.java24
6 files changed, 67 insertions, 10 deletions
diff --git a/res/layout/external_itemlist_item.xml b/res/layout/external_itemlist_item.xml
index b03113ed1..cf8843f05 100644
--- a/res/layout/external_itemlist_item.xml
+++ b/res/layout/external_itemlist_item.xml
@@ -30,11 +30,44 @@
android:id="@+id/txtvTitle"
android:layout_width="0dp"
android:layout_height="wrap_content"
- android:layout_centerVertical="true"
- android:layout_margin="8dp"
+ android:layout_alignParentTop="true"
+ android:layout_marginLeft="8dp"
+ android:layout_marginTop="8dp"
android:layout_toLeftOf="@id/butAction"
android:layout_toRightOf="@id/imgvFeedimage"
+ android:ellipsize="end"
+ android:maxLines="1"
android:textColor="?android:attr/textColorPrimary"
- android:textSize="@dimen/text_size_medium" />
+ android:textSize="@dimen/text_size_small" />
+
+ <TextView
+ android:id="@+id/txtvFeedname"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/txtvTitle"
+ android:layout_marginLeft="8dp"
+ android:layout_marginRight="8dp"
+ android:layout_toLeftOf="@id/butAction"
+ android:layout_toRightOf="@id/imgvFeedimage"
+ android:ellipsize="end"
+ android:maxLines="1"
+ android:textColor="?android:attr/textColorSecondary"
+ android:textSize="@dimen/text_size_micro" />
+
+ <TextView
+ android:id="@+id/txtvLenSize"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/txtvFeedname"
+ android:layout_marginTop="4dp"
+ android:layout_marginBottom="8dp"
+ android:layout_marginLeft="8dp"
+ android:layout_marginRight="8dp"
+ android:layout_toLeftOf="@id/butAction"
+ android:layout_toRightOf="@id/imgvFeedimage"
+ android:ellipsize="end"
+ android:maxLines="1"
+ android:textColor="?android:attr/textColorTertiary"
+ android:textSize="@dimen/text_size_micro" />
</RelativeLayout> \ No newline at end of file
diff --git a/res/layout/feeditemlist_header.xml b/res/layout/feeditemlist_header.xml
index cfe573eac..581ed76ea 100644
--- a/res/layout/feeditemlist_header.xml
+++ b/res/layout/feeditemlist_header.xml
@@ -14,7 +14,7 @@
android:layout_marginRight="16dp"
android:layout_marginTop="24dp"
android:paddingLeft="8dp"
- android:textColor="@color/bright_blue"
+ android:textColor="@color/dark_blue"
android:textSize="@dimen/text_size_large"
android:textStyle="bold" />
diff --git a/res/layout/feedlist_item.xml b/res/layout/feedlist_item.xml
index 7ec1b0a79..dab9a80ec 100644
--- a/res/layout/feedlist_item.xml
+++ b/res/layout/feedlist_item.xml
@@ -2,9 +2,7 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:paddingBottom="4dp"
- android:paddingRight="8dp"
- android:paddingTop="4dp" >
+ android:paddingRight="8dp" >
<ImageView
android:id="@+id/imgvFeedimage"
@@ -12,7 +10,6 @@
android:layout_height="@dimen/thumbnail_length"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
- android:layout_marginLeft="1dip"
android:layout_marginRight="4dip"
android:adjustViewBounds="true"
android:cropToPadding="true"
@@ -72,6 +69,7 @@
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
+ android:layout_centerVertical="true"
android:layout_toLeftOf="@id/lEpisodeCounts"
android:layout_toRightOf="@id/imgvFeedimage"
android:orientation="vertical" >
@@ -80,7 +78,8 @@
android:id="@+id/txtvFeedname"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:maxLines="2"
+ android:ellipsize="end"
+ android:maxLines="1"
android:textColor="?android:attr/textColorPrimary"
android:textSize="@dimen/text_size_small" />
diff --git a/res/values/colors.xml b/res/values/colors.xml
index 6adc4dbc8..e4a7864d6 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -18,6 +18,7 @@
<color name="navy">#000080</color>
<color name="black">#000000</color>
<color name="bright_blue">#33B5E5</color>
+ <color name="dark_blue">#3899C9</color>
<color name="ics_gray">#858585</color>
<color name="actionbar_gray">#DDDDDD</color>
<color name="download_success_green">#669900</color>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 8c9dd6d35..b4cd7243f 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -2,7 +2,7 @@
<resources>
<dimen name="widget_margin">8dp</dimen>
- <dimen name="thumbnail_length">55dp</dimen>
+ <dimen name="thumbnail_length">70dp</dimen>
<dimen name="external_player_height">55dp</dimen>
<dimen name="enc_icons_size">20dp</dimen>
<dimen name="text_size_micro">12sp</dimen>
diff --git a/src/de/danoeh/antennapod/adapter/ExternalEpisodesListAdapter.java b/src/de/danoeh/antennapod/adapter/ExternalEpisodesListAdapter.java
index 1b771b7b9..b7161b2c6 100644
--- a/src/de/danoeh/antennapod/adapter/ExternalEpisodesListAdapter.java
+++ b/src/de/danoeh/antennapod/adapter/ExternalEpisodesListAdapter.java
@@ -15,6 +15,8 @@ import de.danoeh.antennapod.PodcastApp;
import de.danoeh.antennapod.R;
import de.danoeh.antennapod.asynctask.FeedImageLoader;
import de.danoeh.antennapod.feed.FeedItem;
+import de.danoeh.antennapod.feed.FeedMedia;
+import de.danoeh.antennapod.util.Converter;
import de.danoeh.antennapod.util.EpisodeFilter;
/**
@@ -92,6 +94,10 @@ public class ExternalEpisodesListAdapter extends BaseExpandableListAdapter {
convertView = inflater.inflate(R.layout.external_itemlist_item,
null);
holder.title = (TextView) convertView.findViewById(R.id.txtvTitle);
+ holder.feedTitle = (TextView) convertView
+ .findViewById(R.id.txtvFeedname);
+ holder.lenSize = (TextView) convertView
+ .findViewById(R.id.txtvLenSize);
holder.feedImage = (ImageView) convertView
.findViewById(R.id.imgvFeedimage);
holder.butAction = (ImageButton) convertView
@@ -102,6 +108,22 @@ public class ExternalEpisodesListAdapter extends BaseExpandableListAdapter {
}
holder.title.setText(item.getTitle());
+ holder.feedTitle.setText(item.getFeed().getTitle());
+ FeedMedia media = item.getMedia();
+ if (media != null) {
+ holder.lenSize.setVisibility(View.VISIBLE);
+ if (!media.isDownloaded()) {
+ holder.lenSize.setText(context.getString(R.string.size_prefix)
+ + Converter.byteToString(media.getSize()));
+ } else {
+ holder.lenSize.setText(context
+ .getString(R.string.length_prefix)
+ + Converter.getDurationStringLong(media.getDuration()));
+ }
+ } else {
+ holder.lenSize.setVisibility(View.INVISIBLE);
+ }
+
holder.feedImage.setTag(item.getFeed().getImage());
FeedImageLoader.getInstance().loadThumbnailBitmap(
item.getFeed().getImage(),
@@ -123,6 +145,8 @@ public class ExternalEpisodesListAdapter extends BaseExpandableListAdapter {
static class Holder {
TextView title;
+ TextView feedTitle;
+ TextView lenSize;
ImageView feedImage;
ImageButton butAction;
}