diff options
author | ByteHamster <info@bytehamster.com> | 2022-05-13 20:22:47 +0200 |
---|---|---|
committer | ByteHamster <info@bytehamster.com> | 2022-05-13 20:55:52 +0200 |
commit | 5448e1f390782ebc3c810ff64e151c89ddcdbc31 (patch) | |
tree | d9084666af40bbc145e2cf8b117a0b6a971c441e /app/src/main/java/de/danoeh/antennapod/adapter | |
parent | 6e5004be22f20e3a51697909bf4d1e423252b83c (diff) | |
download | AntennaPod-5448e1f390782ebc3c810ff64e151c89ddcdbc31.zip |
Remove gpodder toplist
Half of the toplist no longer returns a valid podcast feed.
Some of the suggested tags are just random characters and none of them
is actually helpful.
This does not remove search or synchronization.
Just gpodder discovery.
Diffstat (limited to 'app/src/main/java/de/danoeh/antennapod/adapter')
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/adapter/gpodnet/PodcastListAdapter.java | 83 | ||||
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/adapter/gpodnet/TagListAdapter.java | 54 |
2 files changed, 0 insertions, 137 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 deleted file mode 100644 index a125515cc..000000000 --- a/app/src/main/java/de/danoeh/antennapod/adapter/gpodnet/PodcastListAdapter.java +++ /dev/null @@ -1,83 +0,0 @@ -package de.danoeh.antennapod.adapter.gpodnet; - -import android.content.Context; -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; -import android.widget.ArrayAdapter; -import android.widget.ImageView; -import android.widget.TextView; - -import com.bumptech.glide.Glide; - -import com.bumptech.glide.load.resource.bitmap.FitCenter; -import com.bumptech.glide.load.resource.bitmap.RoundedCorners; -import com.bumptech.glide.request.RequestOptions; -import de.danoeh.antennapod.net.sync.gpoddernet.model.GpodnetPodcast; -import org.apache.commons.lang3.StringUtils; - - -import de.danoeh.antennapod.R; -import de.danoeh.antennapod.core.glide.ApGlideSettings; - -import java.util.List; - -/** - * Adapter for displaying a list of GPodnetPodcast-Objects. - */ -public class PodcastListAdapter extends ArrayAdapter<GpodnetPodcast> { - - public PodcastListAdapter(Context context, int resource, List<GpodnetPodcast> objects) { - super(context, resource, objects); - } - - @Override - public View getView(int position, View convertView, ViewGroup parent) { - Holder holder; - - GpodnetPodcast podcast = getItem(position); - - // Inflate Layout - if (convertView == null) { - holder = new Holder(); - LayoutInflater inflater = (LayoutInflater) getContext() - .getSystemService(Context.LAYOUT_INFLATER_SERVICE); - - convertView = inflater.inflate(R.layout.gpodnet_podcast_listitem, parent, false); - holder.image = convertView.findViewById(R.id.imgvCover); - holder.title = convertView.findViewById(R.id.txtvTitle); - holder.subscribers = convertView.findViewById(R.id.txtvSubscribers); - holder.author = convertView.findViewById(R.id.txtvAuthor); - convertView.setTag(holder); - } else { - holder = (Holder) convertView.getTag(); - } - - if (StringUtils.isNotBlank(podcast.getLogoUrl())) { - Glide.with(convertView.getContext()) - .load(podcast.getLogoUrl()) - .apply(new RequestOptions() - .placeholder(R.color.light_gray) - .error(R.color.light_gray) - .diskCacheStrategy(ApGlideSettings.AP_DISK_CACHE_STRATEGY) - .transforms(new FitCenter(), - new RoundedCorners((int) (4 * convertView.getContext() - .getResources().getDisplayMetrics().density))) - .dontAnimate()) - .into(holder.image); - } - - holder.title.setText(podcast.getTitle()); - holder.subscribers.setText(String.valueOf(podcast.getSubscribers())); - holder.author.setText(podcast.getAuthor()); - - return convertView; - } - - static class Holder { - ImageView image; - TextView title; - TextView subscribers; - TextView author; - } -} diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/gpodnet/TagListAdapter.java b/app/src/main/java/de/danoeh/antennapod/adapter/gpodnet/TagListAdapter.java deleted file mode 100644 index b0441688d..000000000 --- a/app/src/main/java/de/danoeh/antennapod/adapter/gpodnet/TagListAdapter.java +++ /dev/null @@ -1,54 +0,0 @@ -package de.danoeh.antennapod.adapter.gpodnet; - -import android.content.Context; -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; -import android.widget.ArrayAdapter; -import android.widget.TextView; - -import de.danoeh.antennapod.R; -import de.danoeh.antennapod.net.sync.gpoddernet.model.GpodnetTag; - -import java.util.List; - -/** - * Adapter for displaying a list of GPodnetPodcast-Objects. - */ -public class TagListAdapter extends ArrayAdapter<GpodnetTag> { - - public TagListAdapter(Context context, int resource, List<GpodnetTag> objects) { - super(context, resource, objects); - } - - @Override - public View getView(int position, View convertView, ViewGroup parent) { - Holder holder; - - GpodnetTag tag = getItem(position); - - // Inflate Layout - if (convertView == null) { - holder = new Holder(); - LayoutInflater inflater = (LayoutInflater) getContext() - .getSystemService(Context.LAYOUT_INFLATER_SERVICE); - - convertView = inflater.inflate(R.layout.gpodnet_tag_listitem, parent, false); - holder.title = convertView.findViewById(R.id.txtvTitle); - holder.usage = convertView.findViewById(R.id.txtvUsage); - convertView.setTag(holder); - } else { - holder = (Holder) convertView.getTag(); - } - - holder.title.setText(tag.getTitle()); - holder.usage.setText(String.valueOf(tag.getUsage())); - - return convertView; - } - - static class Holder { - TextView title; - TextView usage; - } -} |