From 5448e1f390782ebc3c810ff64e151c89ddcdbc31 Mon Sep 17 00:00:00 2001 From: ByteHamster Date: Fri, 13 May 2022 20:22:47 +0200 Subject: 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. --- .../adapter/gpodnet/PodcastListAdapter.java | 83 -------- .../antennapod/adapter/gpodnet/TagListAdapter.java | 54 ----- .../antennapod/fragment/AddFeedFragment.java | 4 +- .../fragment/gpodnet/GpodnetMainFragment.java | 112 ---------- .../fragment/gpodnet/PodcastListFragment.java | 110 ---------- .../fragment/gpodnet/PodcastTopListFragment.java | 16 -- .../antennapod/fragment/gpodnet/TagFragment.java | 45 ---- .../fragment/gpodnet/TagListFragment.java | 73 ------- app/src/main/res/layout/addfeed.xml | 230 +++++++++++---------- app/src/main/res/layout/fragment_itunes_search.xml | 27 ++- app/src/main/res/layout/gpodnet_podcast_list.xml | 55 ----- .../main/res/layout/gpodnet_podcast_listitem.xml | 80 ------- app/src/main/res/layout/gpodnet_tag_listitem.xml | 37 ---- 13 files changed, 135 insertions(+), 791 deletions(-) delete mode 100644 app/src/main/java/de/danoeh/antennapod/adapter/gpodnet/PodcastListAdapter.java delete mode 100644 app/src/main/java/de/danoeh/antennapod/adapter/gpodnet/TagListAdapter.java delete mode 100644 app/src/main/java/de/danoeh/antennapod/fragment/gpodnet/GpodnetMainFragment.java delete mode 100644 app/src/main/java/de/danoeh/antennapod/fragment/gpodnet/PodcastListFragment.java delete mode 100644 app/src/main/java/de/danoeh/antennapod/fragment/gpodnet/PodcastTopListFragment.java delete mode 100644 app/src/main/java/de/danoeh/antennapod/fragment/gpodnet/TagFragment.java delete mode 100644 app/src/main/java/de/danoeh/antennapod/fragment/gpodnet/TagListFragment.java delete mode 100644 app/src/main/res/layout/gpodnet_podcast_list.xml delete mode 100644 app/src/main/res/layout/gpodnet_podcast_listitem.xml delete mode 100644 app/src/main/res/layout/gpodnet_tag_listitem.xml (limited to 'app/src/main') 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 { - - public PodcastListAdapter(Context context, int resource, List 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 { - - public TagListAdapter(Context context, int resource, List 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; - } -} diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/AddFeedFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/AddFeedFragment.java index d2a2e6de8..fce5b0ddc 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/AddFeedFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/AddFeedFragment.java @@ -35,9 +35,9 @@ import de.danoeh.antennapod.core.storage.DBTasks; import de.danoeh.antennapod.model.feed.SortOrder; import de.danoeh.antennapod.databinding.AddfeedBinding; import de.danoeh.antennapod.databinding.EditTextDialogBinding; -import de.danoeh.antennapod.fragment.gpodnet.GpodnetMainFragment; import de.danoeh.antennapod.net.discovery.CombinedSearcher; import de.danoeh.antennapod.net.discovery.FyydPodcastSearcher; +import de.danoeh.antennapod.net.discovery.GpodnetPodcastSearcher; import de.danoeh.antennapod.net.discovery.ItunesPodcastSearcher; import de.danoeh.antennapod.net.discovery.PodcastIndexPodcastSearcher; import io.reactivex.Observable; @@ -84,7 +84,7 @@ public class AddFeedFragment extends Fragment { viewBinding.searchFyydButton.setOnClickListener(v -> activity.loadChildFragment(OnlineSearchFragment.newInstance(FyydPodcastSearcher.class))); viewBinding.searchGPodderButton.setOnClickListener(v - -> activity.loadChildFragment(new GpodnetMainFragment())); + -> activity.loadChildFragment(OnlineSearchFragment.newInstance(GpodnetPodcastSearcher.class))); viewBinding.searchPodcastIndexButton.setOnClickListener(v -> activity.loadChildFragment(OnlineSearchFragment.newInstance(PodcastIndexPodcastSearcher.class))); diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/gpodnet/GpodnetMainFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/gpodnet/GpodnetMainFragment.java deleted file mode 100644 index fc2f1fa47..000000000 --- a/app/src/main/java/de/danoeh/antennapod/fragment/gpodnet/GpodnetMainFragment.java +++ /dev/null @@ -1,112 +0,0 @@ -package de.danoeh.antennapod.fragment.gpodnet; - -import android.app.Activity; -import android.os.Bundle; -import android.view.LayoutInflater; -import android.view.MenuItem; -import android.view.View; -import android.view.ViewGroup; - -import androidx.annotation.NonNull; -import androidx.appcompat.widget.SearchView; -import androidx.appcompat.widget.Toolbar; -import androidx.fragment.app.Fragment; -import androidx.viewpager2.adapter.FragmentStateAdapter; -import androidx.viewpager2.widget.ViewPager2; - -import com.google.android.material.tabs.TabLayout; -import com.google.android.material.tabs.TabLayoutMediator; - -import de.danoeh.antennapod.R; -import de.danoeh.antennapod.activity.MainActivity; -import de.danoeh.antennapod.fragment.OnlineSearchFragment; -import de.danoeh.antennapod.net.discovery.GpodnetPodcastSearcher; - -/** - * Main navigation hub for gpodder.net podcast directory - */ -public class GpodnetMainFragment extends Fragment { - - private static final int NUM_PAGES = 2; - private static final int POS_TOPLIST = 0; - private static final int POS_TAGS = 1; - - @Override - public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { - super.onCreateView(inflater, container, savedInstanceState); - View root = inflater.inflate(R.layout.pager_fragment, container, false); - setupToolbar(root.findViewById(R.id.toolbar)); - - ViewPager2 viewPager = root.findViewById(R.id.viewpager); - GpodnetPagerAdapter pagerAdapter = new GpodnetPagerAdapter(this); - viewPager.setAdapter(pagerAdapter); - - // Give the TabLayout the ViewPager - TabLayout tabLayout = root.findViewById(R.id.sliding_tabs); - - new TabLayoutMediator(tabLayout, viewPager, (tab, position) -> { - switch (position) { - case POS_TAGS: - tab.setText(R.string.gpodnet_taglist_header); - break; - case POS_TOPLIST: // Fall-through - default: - tab.setText(R.string.gpodnet_toplist_header); - break; - } - }).attach(); - - return root; - } - - private void setupToolbar(Toolbar toolbar) { - toolbar.setTitle(R.string.gpodnet_main_label); - toolbar.setNavigationOnClickListener(v -> getParentFragmentManager().popBackStack()); - - toolbar.inflateMenu(R.menu.search); - MenuItem searchItem = toolbar.getMenu().findItem(R.id.action_search); - final SearchView sv = (SearchView) searchItem.getActionView(); - sv.setQueryHint(getString(R.string.gpodnet_search_hint)); - sv.setOnQueryTextListener(new SearchView.OnQueryTextListener() { - @Override - public boolean onQueryTextSubmit(String query) { - Activity activity = getActivity(); - if (activity != null) { - searchItem.collapseActionView(); - ((MainActivity) activity).loadChildFragment( - OnlineSearchFragment.newInstance(GpodnetPodcastSearcher.class, query)); - } - return true; - } - - @Override - public boolean onQueryTextChange(String s) { - return false; - } - }); - } - - public static class GpodnetPagerAdapter extends FragmentStateAdapter { - - GpodnetPagerAdapter(@NonNull Fragment fragment) { - super(fragment); - } - - @NonNull - @Override - public Fragment createFragment(int position) { - switch (position) { - case POS_TAGS: - return new TagListFragment(); - case POS_TOPLIST: // Fall-through - default: - return new PodcastTopListFragment(); - } - } - - @Override - public int getItemCount() { - return NUM_PAGES; - } - } -} diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/gpodnet/PodcastListFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/gpodnet/PodcastListFragment.java deleted file mode 100644 index c2c5adc9a..000000000 --- a/app/src/main/java/de/danoeh/antennapod/fragment/gpodnet/PodcastListFragment.java +++ /dev/null @@ -1,110 +0,0 @@ -package de.danoeh.antennapod.fragment.gpodnet; - -import android.content.Intent; -import android.os.Bundle; -import android.util.Log; -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; -import android.widget.Button; -import android.widget.GridView; -import android.widget.ProgressBar; -import android.widget.TextView; -import androidx.fragment.app.Fragment; -import de.danoeh.antennapod.R; -import de.danoeh.antennapod.activity.MainActivity; -import de.danoeh.antennapod.activity.OnlineFeedViewActivity; -import de.danoeh.antennapod.adapter.gpodnet.PodcastListAdapter; -import de.danoeh.antennapod.core.sync.SynchronizationCredentials; -import de.danoeh.antennapod.core.service.download.AntennapodHttpClient; -import de.danoeh.antennapod.net.sync.gpoddernet.GpodnetService; -import de.danoeh.antennapod.net.sync.gpoddernet.GpodnetServiceException; -import de.danoeh.antennapod.net.sync.gpoddernet.model.GpodnetPodcast; -import io.reactivex.Observable; -import io.reactivex.android.schedulers.AndroidSchedulers; -import io.reactivex.disposables.Disposable; -import io.reactivex.schedulers.Schedulers; - -import java.util.List; - -/** - * Displays a list of GPodnetPodcast-Objects in a GridView - */ -public abstract class PodcastListFragment extends Fragment { - private static final String TAG = "PodcastListFragment"; - - private GridView gridView; - private ProgressBar progressBar; - private TextView txtvError; - private Button butRetry; - private Disposable disposable; - - @Override - public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { - View root = inflater.inflate(R.layout.gpodnet_podcast_list, container, false); - gridView = root.findViewById(R.id.gridView); - progressBar = root.findViewById(R.id.progressBar); - txtvError = root.findViewById(R.id.txtvError); - butRetry = root.findViewById(R.id.butRetry); - - gridView.setOnItemClickListener((parent, view, position, id) -> - onPodcastSelected((GpodnetPodcast) gridView.getAdapter().getItem(position))); - butRetry.setOnClickListener(v -> loadData()); - - loadData(); - return root; - } - - private void onPodcastSelected(GpodnetPodcast selection) { - Log.d(TAG, "Selected podcast: " + selection.toString()); - Intent intent = new Intent(getActivity(), OnlineFeedViewActivity.class); - intent.putExtra(OnlineFeedViewActivity.ARG_FEEDURL, selection.getUrl()); - intent.putExtra(MainActivity.EXTRA_STARTED_FROM_SEARCH, true); - startActivity(intent); - } - - protected abstract List loadPodcastData(GpodnetService service) throws GpodnetServiceException; - - final void loadData() { - if (disposable != null) { - disposable.dispose(); - } - gridView.setVisibility(View.GONE); - progressBar.setVisibility(View.VISIBLE); - txtvError.setVisibility(View.GONE); - butRetry.setVisibility(View.GONE); - disposable = Observable.fromCallable( - () -> { - GpodnetService service = new GpodnetService(AntennapodHttpClient.getHttpClient(), - SynchronizationCredentials.getHosturl(), SynchronizationCredentials.getDeviceID(), - SynchronizationCredentials.getUsername(), SynchronizationCredentials.getPassword()); - return loadPodcastData(service); - }) - .subscribeOn(Schedulers.io()) - .observeOn(AndroidSchedulers.mainThread()) - .subscribe( - podcasts -> { - progressBar.setVisibility(View.GONE); - butRetry.setVisibility(View.GONE); - - if (podcasts.size() > 0) { - PodcastListAdapter listAdapter = new PodcastListAdapter(getContext(), 0, podcasts); - gridView.setAdapter(listAdapter); - listAdapter.notifyDataSetChanged(); - gridView.setVisibility(View.VISIBLE); - txtvError.setVisibility(View.GONE); - } else { - gridView.setVisibility(View.GONE); - txtvError.setText(getString(R.string.search_status_no_results)); - txtvError.setVisibility(View.VISIBLE); - } - }, error -> { - gridView.setVisibility(View.GONE); - progressBar.setVisibility(View.GONE); - txtvError.setText(error.getMessage()); - txtvError.setVisibility(View.VISIBLE); - butRetry.setVisibility(View.VISIBLE); - Log.e(TAG, Log.getStackTraceString(error)); - }); - } -} diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/gpodnet/PodcastTopListFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/gpodnet/PodcastTopListFragment.java deleted file mode 100644 index f51ab032f..000000000 --- a/app/src/main/java/de/danoeh/antennapod/fragment/gpodnet/PodcastTopListFragment.java +++ /dev/null @@ -1,16 +0,0 @@ -package de.danoeh.antennapod.fragment.gpodnet; - -import de.danoeh.antennapod.net.sync.gpoddernet.GpodnetService; -import de.danoeh.antennapod.net.sync.gpoddernet.GpodnetServiceException; -import de.danoeh.antennapod.net.sync.gpoddernet.model.GpodnetPodcast; - -import java.util.List; - -public class PodcastTopListFragment extends PodcastListFragment { - private static final int PODCAST_COUNT = 50; - - @Override - protected List loadPodcastData(GpodnetService service) throws GpodnetServiceException { - return service.getPodcastToplist(PODCAST_COUNT); - } -} diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/gpodnet/TagFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/gpodnet/TagFragment.java deleted file mode 100644 index 655cd6ed4..000000000 --- a/app/src/main/java/de/danoeh/antennapod/fragment/gpodnet/TagFragment.java +++ /dev/null @@ -1,45 +0,0 @@ -package de.danoeh.antennapod.fragment.gpodnet; - -import android.os.Bundle; -import androidx.annotation.NonNull; - -import java.util.List; - -import de.danoeh.antennapod.net.sync.gpoddernet.GpodnetService; -import de.danoeh.antennapod.net.sync.gpoddernet.GpodnetServiceException; -import de.danoeh.antennapod.net.sync.gpoddernet.model.GpodnetPodcast; -import de.danoeh.antennapod.net.sync.gpoddernet.model.GpodnetTag; - -/** - * Shows all podcasts from gpodder.net that belong to a specific tag. - * Use the newInstance method of this class to create a new TagFragment. - */ -public class TagFragment extends PodcastListFragment { - private static final int PODCAST_COUNT = 50; - - private GpodnetTag tag; - - public static TagFragment newInstance(@NonNull GpodnetTag tag) { - TagFragment fragment = new TagFragment(); - Bundle args = new Bundle(); - args.putParcelable("tag", tag); - fragment.setArguments(args); - return fragment; - } - - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - - Bundle args = getArguments(); - if (args == null || args.getParcelable("tag") == null) { - throw new IllegalArgumentException("Arguments not given"); - } - tag = args.getParcelable("tag"); - } - - @Override - protected List loadPodcastData(GpodnetService service) throws GpodnetServiceException { - return service.getPodcastsForTag(tag, PODCAST_COUNT); - } -} diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/gpodnet/TagListFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/gpodnet/TagListFragment.java deleted file mode 100644 index abdfab941..000000000 --- a/app/src/main/java/de/danoeh/antennapod/fragment/gpodnet/TagListFragment.java +++ /dev/null @@ -1,73 +0,0 @@ -package de.danoeh.antennapod.fragment.gpodnet; - -import android.os.Bundle; -import android.util.Log; -import android.view.View; -import android.widget.TextView; -import androidx.annotation.NonNull; -import androidx.fragment.app.ListFragment; -import de.danoeh.antennapod.activity.MainActivity; -import de.danoeh.antennapod.adapter.gpodnet.TagListAdapter; -import de.danoeh.antennapod.core.sync.SynchronizationCredentials; -import de.danoeh.antennapod.core.service.download.AntennapodHttpClient; -import de.danoeh.antennapod.net.sync.gpoddernet.GpodnetService; -import de.danoeh.antennapod.net.sync.gpoddernet.model.GpodnetTag; -import io.reactivex.Observable; -import io.reactivex.android.schedulers.AndroidSchedulers; -import io.reactivex.disposables.Disposable; -import io.reactivex.schedulers.Schedulers; - -public class TagListFragment extends ListFragment { - private static final int COUNT = 50; - private static final String TAG = "TagListFragment"; - private Disposable disposable; - - @Override - public void onViewCreated(@NonNull View view, Bundle savedInstanceState) { - super.onViewCreated(view, savedInstanceState); - - getListView().setOnItemClickListener((parent, view1, position, id) -> { - GpodnetTag tag = (GpodnetTag) getListAdapter().getItem(position); - ((MainActivity) getActivity()).loadChildFragment(TagFragment.newInstance(tag)); - }); - - startLoadTask(); - } - - @Override - public void onDestroyView() { - super.onDestroyView(); - - if (disposable != null) { - disposable.dispose(); - } - } - - private void startLoadTask() { - if (disposable != null) { - disposable.dispose(); - } - setListShown(false); - disposable = Observable.fromCallable( - () -> { - GpodnetService service = new GpodnetService(AntennapodHttpClient.getHttpClient(), - SynchronizationCredentials.getHosturl(), SynchronizationCredentials.getDeviceID(), - SynchronizationCredentials.getUsername(), SynchronizationCredentials.getPassword()); - return service.getTopTags(COUNT); - }) - .subscribeOn(Schedulers.io()) - .observeOn(AndroidSchedulers.mainThread()) - .subscribe( - tags -> { - setListAdapter(new TagListAdapter(getContext(), android.R.layout.simple_list_item_1, tags)); - setListShown(true); - }, error -> { - TextView txtvError = new TextView(getActivity()); - txtvError.setText(error.getMessage()); - getListView().setEmptyView(txtvError); - setListShown(true); - Log.e(TAG, Log.getStackTraceString(error)); - }); - } -} - diff --git a/app/src/main/res/layout/addfeed.xml b/app/src/main/res/layout/addfeed.xml index a6e0fc9ea..8e2fb99fa 100644 --- a/app/src/main/res/layout/addfeed.xml +++ b/app/src/main/res/layout/addfeed.xml @@ -1,153 +1,157 @@ + xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="vertical"> + android:id="@+id/toolbar" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:minHeight="?attr/actionBarSize" + android:theme="?attr/actionBarTheme" + app:title="@string/add_feed_label" + app:navigationIcon="?homeAsUpIndicator" /> + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginLeft="16dp" + android:layout_marginRight="16dp" + app:cardCornerRadius="4dp" + app:cardElevation="4dp"> + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal"> + android:id="@+id/searchButton" + android:layout_width="40dp" + android:layout_height="match_parent" + android:layout_marginLeft="8dp" + android:layout_marginRight="8dp" + android:contentDescription="@string/search_podcast_hint" + android:scaleType="center" + app:srcCompat="@drawable/ic_search" /> + android:id="@+id/combinedFeedSearchEditText" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:inputType="text" + android:imeOptions="actionSearch" + android:importantForAutofill="no" + android:layout_marginStart="0dp" + android:layout_marginLeft="0dp" + android:layout_marginRight="8dp" + android:layout_marginEnd="8dp" + android:paddingTop="16dp" + android:paddingBottom="16dp" + android:hint="@string/search_podcast_hint" + android:background="@null" /> + + android:layout_width="match_parent" + android:layout_height="0dp" + android:layout_weight="1" + android:scrollbars="vertical"> + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + android:focusableInTouchMode="true" + android:padding="16dp"> + android:id="@+id/quickFeedDiscovery" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:name="de.danoeh.antennapod.fragment.QuickFeedDiscoveryFragment" /> + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/advanced" + android:textSize="18sp" + android:layout_marginTop="16dp" + android:layout_marginBottom="8dp" + android:textColor="?android:attr/textColorPrimary" /> + android:id="@+id/addViaUrlButton" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/add_podcast_by_url" + app:drawableStartCompat="@drawable/ic_feed" + app:drawableLeftCompat="@drawable/ic_feed" + style="@style/AddPodcastTextView" /> + android:id="@+id/addLocalFolderButton" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/add_local_folder" + app:drawableStartCompat="@drawable/ic_folder" + app:drawableLeftCompat="@drawable/ic_folder" + style="@style/AddPodcastTextView" /> + android:id="@+id/searchItunesButton" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/search_itunes_label" + app:drawableStartCompat="@drawable/ic_search" + app:drawableLeftCompat="@drawable/ic_search" + style="@style/AddPodcastTextView" /> + android:id="@+id/searchFyydButton" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/search_fyyd_label" + app:drawableStartCompat="@drawable/ic_search" + app:drawableLeftCompat="@drawable/ic_search" + style="@style/AddPodcastTextView" /> + android:id="@+id/searchGPodderButton" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/gpodnet_search_hint" + app:drawableStartCompat="@drawable/ic_search" + app:drawableLeftCompat="@drawable/ic_search" + style="@style/AddPodcastTextView" /> + android:id="@+id/searchPodcastIndexButton" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/search_podcastindex_label" + app:drawableStartCompat="@drawable/ic_search" + app:drawableLeftCompat="@drawable/ic_search" + style="@style/AddPodcastTextView" /> + android:id="@+id/opmlImportButton" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/opml_add_podcast_label" + app:drawableStartCompat="@drawable/ic_download" + app:drawableLeftCompat="@drawable/ic_download" + style="@style/AddPodcastTextView" /> + + + diff --git a/app/src/main/res/layout/fragment_itunes_search.xml b/app/src/main/res/layout/fragment_itunes_search.xml index 6e00bdf0d..b20016f68 100644 --- a/app/src/main/res/layout/fragment_itunes_search.xml +++ b/app/src/main/res/layout/fragment_itunes_search.xml @@ -1,23 +1,26 @@ + + xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + xmlns:app="http://schemas.android.com/apk/res-auto" + android:layout_width="match_parent" + android:layout_height="match_parent"> + + app:title="@string/discover" /> + + tools:listitem="@layout/itunes_podcast_listitem" /> + android:visibility="gone" /> + android:textAlignment="textEnd" /> + diff --git a/app/src/main/res/layout/gpodnet_podcast_list.xml b/app/src/main/res/layout/gpodnet_podcast_list.xml deleted file mode 100644 index a6918f8d4..000000000 --- a/app/src/main/res/layout/gpodnet_podcast_list.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - -