summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Hennen <TomHennen@users.noreply.github.com>2015-03-16 21:02:27 -0400
committerTom Hennen <TomHennen@users.noreply.github.com>2015-03-16 21:02:27 -0400
commitd1d0013c674b508c487c9934499a79390c0c8034 (patch)
treecc4bc52f3fa49ea869de02f79ea853f6c7640f77
parentc680c10c914736edc6494140678a66431a421ce0 (diff)
parent9c337c787584187b74a2eccf8b90d4bbfc7ccbca (diff)
downloadAntennaPod-d1d0013c674b508c487c9934499a79390c0c8034.zip
Merge pull request #679 from mfietz/feature/gpodder_search_more_information
Gpodder search shows feed url and number of subscribers
-rw-r--r--app/src/main/java/de/danoeh/antennapod/adapter/gpodnet/PodcastListAdapter.java15
-rw-r--r--app/src/main/res/layout/gpodnet_podcast_listitem.xml65
-rwxr-xr-xcore/src/main/res/drawable-hdpi/ic_feed_grey600_24dp.pngbin0 -> 1601 bytes
-rwxr-xr-xcore/src/main/res/drawable-hdpi/ic_feed_white_24dp.pngbin0 -> 1367 bytes
-rwxr-xr-xcore/src/main/res/drawable-mdpi/ic_feed_grey600_24dp.pngbin0 -> 1018 bytes
-rwxr-xr-xcore/src/main/res/drawable-mdpi/ic_feed_white_24dp.pngbin0 -> 875 bytes
-rwxr-xr-xcore/src/main/res/drawable-xhdpi/ic_feed_grey600_24dp.pngbin0 -> 2223 bytes
-rwxr-xr-xcore/src/main/res/drawable-xhdpi/ic_feed_white_24dp.pngbin0 -> 1933 bytes
-rwxr-xr-xcore/src/main/res/drawable-xxhdpi/ic_feed_grey600_24dp.pngbin0 -> 3265 bytes
-rwxr-xr-xcore/src/main/res/drawable-xxhdpi/ic_feed_white_24dp.pngbin0 -> 2884 bytes
-rw-r--r--core/src/main/res/values/attrs.xml1
-rw-r--r--core/src/main/res/values/styles.xml4
12 files changed, 75 insertions, 10 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/gpodnet/PodcastListAdapter.java b/app/src/main/java/de/danoeh/antennapod/adapter/gpodnet/PodcastListAdapter.java
index 58af2c4d5..b85709c5e 100644
--- a/app/src/main/java/de/danoeh/antennapod/adapter/gpodnet/PodcastListAdapter.java
+++ b/app/src/main/java/de/danoeh/antennapod/adapter/gpodnet/PodcastListAdapter.java
@@ -39,16 +39,15 @@ public class PodcastListAdapter extends ArrayAdapter<GpodnetPodcast> {
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
convertView = inflater.inflate(R.layout.gpodnet_podcast_listitem, parent, false);
- holder.title = (TextView) convertView.findViewById(R.id.txtvTitle);
holder.image = (ImageView) convertView.findViewById(R.id.imgvCover);
-
+ holder.title = (TextView) convertView.findViewById(R.id.txtvTitle);
+ holder.subscribers = (TextView) convertView.findViewById(R.id.txtvSubscribers);
+ holder.url = (TextView) convertView.findViewById(R.id.txtvUrl);
convertView.setTag(holder);
} else {
holder = (Holder) convertView.getTag();
}
- holder.title.setText(podcast.getTitle());
-
if (StringUtils.isNotBlank(podcast.getLogoUrl())) {
Picasso.with(convertView.getContext())
.load(podcast.getLogoUrl())
@@ -56,11 +55,17 @@ public class PodcastListAdapter extends ArrayAdapter<GpodnetPodcast> {
.into(holder.image);
}
+ holder.title.setText(podcast.getTitle());
+ holder.subscribers.setText(String.valueOf(podcast.getSubscribers()));
+ holder.url.setText(podcast.getUrl());
+
return convertView;
}
static class Holder {
- TextView title;
ImageView image;
+ TextView title;
+ TextView subscribers;
+ TextView url;
}
}
diff --git a/app/src/main/res/layout/gpodnet_podcast_listitem.xml b/app/src/main/res/layout/gpodnet_podcast_listitem.xml
index 2ade8e478..8890f1b77 100644
--- a/app/src/main/res/layout/gpodnet_podcast_listitem.xml
+++ b/app/src/main/res/layout/gpodnet_podcast_listitem.xml
@@ -23,16 +23,71 @@
tools:src="@drawable/ic_stat_antenna_default"
tools:background="@android:color/holo_green_dark" />
+ <LinearLayout
+ android:id="@+id/subscribers_container"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignTop="@id/txtvTitle"
+ android:layout_alignParentRight="true"
+ android:layout_marginRight="@dimen/listitem_threeline_horizontalpadding"
+ android:orientation="horizontal">
+
+ <ImageView
+ android:id="@+id/imgFeed"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:layout_marginRight="-4dp"
+ android:src="?attr/feed" />
+
+ <TextView
+ android:id="@+id/txtvSubscribers"
+ style="@style/AntennaPod.TextView.ListItemSecondaryTitle"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:lines="1"
+ tools:text="150"
+ tools:background="@android:color/holo_green_dark" />
+
+ </LinearLayout>
+
<TextView
android:id="@+id/txtvTitle"
style="@style/AntennaPod.TextView.ListItemPrimaryTitle"
- android:layout_width="match_parent"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_centerVertical="true"
- android:layout_marginBottom="@dimen/listitem_threeline_verticalpadding"
+ android:layout_marginBottom="@dimen/list_vertical_padding"
android:layout_marginRight="@dimen/listitem_threeline_horizontalpadding"
android:layout_toRightOf="@id/imgvCover"
- android:maxLines="1"
- tools:text="Podcast title"
+ android:layout_toLeftOf="@id/subscribers_container"
+ android:layout_alignTop="@id/imgvCover"
+ android:lines="1"
+ tools:text="Title"
tools:background="@android:color/holo_green_dark" />
+
+ <TextView
+ android:id="@+id/txtvUrl"
+ style="android:style/TextAppearance.Small"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginRight="@dimen/listitem_threeline_horizontalpadding"
+ android:layout_toRightOf="@id/imgvCover"
+ android:layout_below="@id/txtvTitle"
+ android:textSize="14sp"
+ android:textColor="?android:attr/textColorSecondary"
+ android:ellipsize="middle"
+ android:maxLines="2"
+ tools:text="http://www.example.com/feed"
+ tools:background="@android:color/holo_green_dark"/>
+
+ <EditText
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:inputType="textPersonName"
+ android:text="Name"
+ android:ems="10"
+ android:id="@+id/editText"
+ android:layout_alignParentTop="true"
+ android:layout_alignParentLeft="true"
+ android:layout_alignParentStart="true"
+ android:layout_marginTop="231dp"/>
</RelativeLayout>
diff --git a/core/src/main/res/drawable-hdpi/ic_feed_grey600_24dp.png b/core/src/main/res/drawable-hdpi/ic_feed_grey600_24dp.png
new file mode 100755
index 000000000..46be3e14e
--- /dev/null
+++ b/core/src/main/res/drawable-hdpi/ic_feed_grey600_24dp.png
Binary files differ
diff --git a/core/src/main/res/drawable-hdpi/ic_feed_white_24dp.png b/core/src/main/res/drawable-hdpi/ic_feed_white_24dp.png
new file mode 100755
index 000000000..3d57127f5
--- /dev/null
+++ b/core/src/main/res/drawable-hdpi/ic_feed_white_24dp.png
Binary files differ
diff --git a/core/src/main/res/drawable-mdpi/ic_feed_grey600_24dp.png b/core/src/main/res/drawable-mdpi/ic_feed_grey600_24dp.png
new file mode 100755
index 000000000..79f082610
--- /dev/null
+++ b/core/src/main/res/drawable-mdpi/ic_feed_grey600_24dp.png
Binary files differ
diff --git a/core/src/main/res/drawable-mdpi/ic_feed_white_24dp.png b/core/src/main/res/drawable-mdpi/ic_feed_white_24dp.png
new file mode 100755
index 000000000..15a4b16bf
--- /dev/null
+++ b/core/src/main/res/drawable-mdpi/ic_feed_white_24dp.png
Binary files differ
diff --git a/core/src/main/res/drawable-xhdpi/ic_feed_grey600_24dp.png b/core/src/main/res/drawable-xhdpi/ic_feed_grey600_24dp.png
new file mode 100755
index 000000000..5cb0262ee
--- /dev/null
+++ b/core/src/main/res/drawable-xhdpi/ic_feed_grey600_24dp.png
Binary files differ
diff --git a/core/src/main/res/drawable-xhdpi/ic_feed_white_24dp.png b/core/src/main/res/drawable-xhdpi/ic_feed_white_24dp.png
new file mode 100755
index 000000000..5f34b0492
--- /dev/null
+++ b/core/src/main/res/drawable-xhdpi/ic_feed_white_24dp.png
Binary files differ
diff --git a/core/src/main/res/drawable-xxhdpi/ic_feed_grey600_24dp.png b/core/src/main/res/drawable-xxhdpi/ic_feed_grey600_24dp.png
new file mode 100755
index 000000000..01ef2ee4d
--- /dev/null
+++ b/core/src/main/res/drawable-xxhdpi/ic_feed_grey600_24dp.png
Binary files differ
diff --git a/core/src/main/res/drawable-xxhdpi/ic_feed_white_24dp.png b/core/src/main/res/drawable-xxhdpi/ic_feed_white_24dp.png
new file mode 100755
index 000000000..6dd465852
--- /dev/null
+++ b/core/src/main/res/drawable-xxhdpi/ic_feed_white_24dp.png
Binary files differ
diff --git a/core/src/main/res/values/attrs.xml b/core/src/main/res/values/attrs.xml
index f36119c8d..368921f76 100644
--- a/core/src/main/res/values/attrs.xml
+++ b/core/src/main/res/values/attrs.xml
@@ -11,6 +11,7 @@
<attr name="av_rewind" format="reference"/>
<attr name="content_discard" format="reference"/>
<attr name="content_new" format="reference"/>
+ <attr name="feed" format="reference"/>
<attr name="device_access_time" format="reference"/>
<attr name="location_web_site" format="reference"/>
<attr name="navigation_accept" format="reference"/>
diff --git a/core/src/main/res/values/styles.xml b/core/src/main/res/values/styles.xml
index a2f180395..e8b0e2b2b 100644
--- a/core/src/main/res/values/styles.xml
+++ b/core/src/main/res/values/styles.xml
@@ -15,6 +15,7 @@
<item name="attr/content_discard">@drawable/ic_delete_grey600_24dp</item>
<item name="attr/content_new">@drawable/ic_add_grey600_24dp</item>
<item name="attr/device_access_time">@drawable/ic_timer_grey600_24dp</item>
+ <item name="attr/feed">@drawable/ic_feed_grey600_24dp</item>
<item name="attr/location_web_site">@drawable/ic_web_grey600_24dp</item>
<item name="attr/navigation_accept">@drawable/ic_done_grey600_24dp</item>
<item name="attr/navigation_cancel">@drawable/ic_cancel_grey600_24dp</item>
@@ -56,6 +57,7 @@
<item name="attr/content_discard">@drawable/ic_delete_white_24dp</item>
<item name="attr/content_new">@drawable/ic_add_white_24dp</item>
<item name="attr/device_access_time">@drawable/ic_timer_white_24dp</item>
+ <item name="attr/feed">@drawable/ic_feed_white_24dp</item>
<item name="attr/location_web_site">@drawable/ic_web_white_24dp</item>
<item name="attr/navigation_accept">@drawable/ic_done_white_24dp</item>
<item name="attr/navigation_cancel">@drawable/ic_cancel_white_24dp</item>
@@ -100,6 +102,7 @@
<item name="attr/content_discard">@drawable/ic_delete_grey600_24dp</item>
<item name="attr/content_new">@drawable/ic_add_grey600_24dp</item>
<item name="attr/device_access_time">@drawable/ic_timer_grey600_24dp</item>
+ <item name="attr/feed">@drawable/ic_feed_grey600_24dp</item>
<item name="attr/location_web_site">@drawable/ic_web_grey600_24dp</item>
<item name="attr/navigation_accept">@drawable/ic_done_grey600_24dp</item>
<item name="attr/navigation_cancel">@drawable/ic_cancel_grey600_24dp</item>
@@ -143,6 +146,7 @@
<item name="attr/content_discard">@drawable/ic_delete_white_24dp</item>
<item name="attr/content_new">@drawable/ic_add_white_24dp</item>
<item name="attr/device_access_time">@drawable/ic_timer_white_24dp</item>
+ <item name="attr/feed">@drawable/ic_feed_white_24dp</item>
<item name="attr/location_web_site">@drawable/ic_web_white_24dp</item>
<item name="attr/navigation_accept">@drawable/ic_done_white_24dp</item>
<item name="attr/navigation_cancel">@drawable/ic_cancel_white_24dp</item>