Merge pull request #679 from mfietz/feature/gpodder_search_more_information
Gpodder search shows feed url and number of subscribers
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
|
|
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1018 B |
After Width: | Height: | Size: 875 B |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 2.8 KiB |
|
@ -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"/>
|
||||
|
|
|
@ -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>
|
||||
|
|