summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorH. Lehmann <ByteHamster@users.noreply.github.com>2020-03-16 22:41:05 +0100
committerGitHub <noreply@github.com>2020-03-16 22:41:05 +0100
commit21c617cc74495d834948d303aa981aab9ebb29fc (patch)
treef803cab0ea55c0078980f4b6d9bdec1f7033d81a /app
parent1837cdd5767dc1b8caa9eb5d707aecb4645de2fb (diff)
parente4fa92b8b98ea15ea49daf05b474e7bbdb626fac (diff)
downloadAntennaPod-21c617cc74495d834948d303aa981aab9ebb29fc.zip
Merge pull request #3936 from ByteHamster/add-feed-page
Made add feed page more white
Diffstat (limited to 'app')
-rw-r--r--app/src/androidTest/java/de/test/antennapod/ui/MainActivityTest.java8
-rw-r--r--app/src/androidTest/java/de/test/antennapod/ui/NavigationDrawerTest.java2
-rw-r--r--app/src/main/java/de/danoeh/antennapod/fragment/AddFeedFragment.java92
-rw-r--r--app/src/main/java/de/danoeh/antennapod/fragment/QuickFeedDiscoveryFragment.java31
-rw-r--r--app/src/main/res/layout/addfeed.xml274
-rw-r--r--app/src/main/res/layout/quick_feed_discovery.xml109
-rw-r--r--app/src/main/res/menu/advanced_search.xml14
7 files changed, 224 insertions, 306 deletions
diff --git a/app/src/androidTest/java/de/test/antennapod/ui/MainActivityTest.java b/app/src/androidTest/java/de/test/antennapod/ui/MainActivityTest.java
index 0784cb078..d0b2cb4b4 100644
--- a/app/src/androidTest/java/de/test/antennapod/ui/MainActivityTest.java
+++ b/app/src/androidTest/java/de/test/antennapod/ui/MainActivityTest.java
@@ -23,12 +23,9 @@ import java.io.IOException;
import static androidx.test.InstrumentationRegistry.getInstrumentation;
import static androidx.test.espresso.Espresso.onView;
import static androidx.test.espresso.action.ViewActions.click;
+import static androidx.test.espresso.action.ViewActions.replaceText;
import static androidx.test.espresso.action.ViewActions.scrollTo;
-import static androidx.test.espresso.action.ViewActions.typeText;
import static androidx.test.espresso.contrib.ActivityResultMatchers.hasResultCode;
-import static androidx.test.espresso.intent.Intents.intended;
-import static androidx.test.espresso.intent.Intents.times;
-import static androidx.test.espresso.intent.matcher.IntentMatchers.hasComponent;
import static androidx.test.espresso.matcher.ViewMatchers.isRoot;
import static androidx.test.espresso.matcher.ViewMatchers.withId;
import static androidx.test.espresso.matcher.ViewMatchers.withText;
@@ -77,7 +74,8 @@ public class MainActivityTest {
final Feed feed = uiTestUtils.hostedFeeds.get(0);
openNavDrawer();
onView(withText(R.string.add_feed_label)).perform(click());
- onView(withId(R.id.etxtFeedurl)).perform(scrollTo(), typeText(feed.getDownload_url()));
+ onView(withId(R.id.btn_add_via_url)).perform(scrollTo(), click());
+ onView(withId(R.id.text)).perform(replaceText(feed.getDownload_url()));
onView(withText(R.string.confirm_label)).perform(scrollTo(), click());
Espresso.closeSoftKeyboard();
onView(withText(R.string.subscribe_label)).perform(click());
diff --git a/app/src/androidTest/java/de/test/antennapod/ui/NavigationDrawerTest.java b/app/src/androidTest/java/de/test/antennapod/ui/NavigationDrawerTest.java
index aa4389057..973e4da2b 100644
--- a/app/src/androidTest/java/de/test/antennapod/ui/NavigationDrawerTest.java
+++ b/app/src/androidTest/java/de/test/antennapod/ui/NavigationDrawerTest.java
@@ -116,7 +116,7 @@ public class NavigationDrawerTest {
openNavDrawer();
onView(withId(R.id.nav_list)).perform(swipeUp());
onDrawerItem(withText(R.string.add_feed_label)).perform(click());
- onView(isRoot()).perform(waitForView(withId(R.id.txtvFeedurl), 1000));
+ onView(isRoot()).perform(waitForView(withId(R.id.btn_add_via_url), 1000));
assertEquals(activity.getString(R.string.add_feed_label), activity.getSupportActionBar().getTitle());
// podcasts
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 7cdcce36f..3ba6be3d9 100644
--- a/app/src/main/java/de/danoeh/antennapod/fragment/AddFeedFragment.java
+++ b/app/src/main/java/de/danoeh/antennapod/fragment/AddFeedFragment.java
@@ -2,20 +2,19 @@ package de.danoeh.antennapod.fragment;
import android.app.Activity;
import android.content.ActivityNotFoundException;
+import android.content.ClipboardManager;
+import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.util.Log;
-import androidx.appcompat.app.AppCompatActivity;
-import androidx.fragment.app.Fragment;
-import android.view.ContextMenu;
import android.view.LayoutInflater;
-import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
-import android.widget.Button;
import android.widget.EditText;
-
+import androidx.appcompat.app.AlertDialog;
+import androidx.appcompat.app.AppCompatActivity;
+import androidx.fragment.app.Fragment;
import de.danoeh.antennapod.R;
import de.danoeh.antennapod.activity.MainActivity;
import de.danoeh.antennapod.activity.OnlineFeedViewActivity;
@@ -23,16 +22,11 @@ import de.danoeh.antennapod.activity.OpmlImportActivity;
import de.danoeh.antennapod.fragment.gpodnet.GpodnetMainFragment;
/**
- * Provides actions for adding new podcast subscriptions
+ * Provides actions for adding new podcast subscriptions.
*/
public class AddFeedFragment extends Fragment {
public static final String TAG = "AddFeedFragment";
-
- /**
- * Preset value for url text field.
- */
- private static final String ARG_FEED_URL = "feedurl";
private static final int REQUEST_CODE_CHOOSE_OPML_IMPORT_PATH = 1;
private EditText combinedFeedSearchBox;
@@ -45,8 +39,20 @@ public class AddFeedFragment extends Fragment {
activity = (MainActivity) getActivity();
((AppCompatActivity) getActivity()).setSupportActionBar(root.findViewById(R.id.toolbar));
- setupAdvancedSearchButtons(root);
- setupSeachBox(root);
+ root.findViewById(R.id.btn_search_itunes).setOnClickListener(v
+ -> activity.loadChildFragment(new ItunesSearchFragment()));
+ root.findViewById(R.id.btn_search_fyyd).setOnClickListener(v
+ -> activity.loadChildFragment(new FyydSearchFragment()));
+ root.findViewById(R.id.btn_search_gpodder).setOnClickListener(v
+ -> activity.loadChildFragment(new GpodnetMainFragment()));
+
+ combinedFeedSearchBox = root.findViewById(R.id.combinedFeedSearchBox);
+ combinedFeedSearchBox.setOnEditorActionListener((v, actionId, event) -> {
+ performSearch();
+ return true;
+ });
+ root.findViewById(R.id.btn_add_via_url).setOnClickListener(v
+ -> showAddViaUrlDialog());
View butOpmlImport = root.findViewById(R.id.btn_opml_import);
butOpmlImport.setOnClickListener(v -> {
@@ -63,54 +69,20 @@ public class AddFeedFragment extends Fragment {
return root;
}
- private void setupSeachBox(View root) {
- final EditText etxtFeedurl = root.findViewById(R.id.etxtFeedurl);
-
- Bundle args = getArguments();
- if (args != null && args.getString(ARG_FEED_URL) != null) {
- etxtFeedurl.setText(args.getString(ARG_FEED_URL));
- }
-
- Button butConfirmAddUrl = root.findViewById(R.id.butConfirm);
- butConfirmAddUrl.setOnClickListener(v -> {
- addUrl(etxtFeedurl.getText().toString());
- });
-
- combinedFeedSearchBox = root.findViewById(R.id.combinedFeedSearchBox);
- combinedFeedSearchBox.setOnEditorActionListener((v, actionId, event) -> {
- performSearch();
- return true;
- });
- }
-
- private void setupAdvancedSearchButtons(View root) {
- View butAdvancedSearch = root.findViewById(R.id.advanced_search);
- registerForContextMenu(butAdvancedSearch);
- butAdvancedSearch.setOnClickListener(v -> butAdvancedSearch.showContextMenu());
+ private void showAddViaUrlDialog() {
+ AlertDialog.Builder builder = new AlertDialog.Builder(getContext());
+ builder.setTitle(R.string.add_podcast_by_url);
+ View content = View.inflate(getContext(), R.layout.edit_text_dialog, null);
+ EditText editText = content.findViewById(R.id.text);
+ editText.setHint(R.string.add_podcast_by_url_hint);
+ ClipboardManager clipboard = (ClipboardManager) getContext().getSystemService(Context.CLIPBOARD_SERVICE);
+ editText.setText(clipboard.getText());
+ builder.setView(content);
+ builder.setPositiveButton(R.string.confirm_label, (dialog, which) -> addUrl(editText.getText().toString()));
+ builder.setNegativeButton(R.string.cancel_label, null);
+ builder.show();
}
- @Override
- public void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo) {
- getActivity().getMenuInflater().inflate(R.menu.advanced_search, menu);
- }
-
- @Override
- public boolean onContextItemSelected(MenuItem item) {
- switch (item.getItemId()) {
- case R.id.search_fyyd:
- activity.loadChildFragment(new FyydSearchFragment());
- return true;
- case R.id.search_gpodder:
- activity.loadChildFragment(new GpodnetMainFragment());
- return true;
- case R.id.search_itunes:
- activity.loadChildFragment(new ItunesSearchFragment());
- return true;
- }
- return false;
- }
-
-
private void addUrl(String url) {
Intent intent = new Intent(getActivity(), OnlineFeedViewActivity.class);
intent.putExtra(OnlineFeedViewActivity.ARG_FEEDURL, url);
diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/QuickFeedDiscoveryFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/QuickFeedDiscoveryFragment.java
index 7e217cde4..d8d0f41c5 100644
--- a/app/src/main/java/de/danoeh/antennapod/fragment/QuickFeedDiscoveryFragment.java
+++ b/app/src/main/java/de/danoeh/antennapod/fragment/QuickFeedDiscoveryFragment.java
@@ -2,6 +2,7 @@ package de.danoeh.antennapod.fragment;
import android.content.Intent;
import android.os.Bundle;
+import android.util.DisplayMetrics;
import androidx.appcompat.app.AlertDialog;
import androidx.fragment.app.Fragment;
import android.util.Log;
@@ -26,11 +27,12 @@ import java.util.List;
public class QuickFeedDiscoveryFragment extends Fragment implements AdapterView.OnItemClickListener {
private static final String TAG = "FeedDiscoveryFragment";
+ private static final int NUM_SUGGESTIONS = 12;
private ProgressBar progressBar;
private Disposable disposable;
private FeedDiscoverAdapter adapter;
- private GridView subscriptionGridLayout;
+ private GridView discoverGridLayout;
private TextView errorTextView;
@Override
@@ -41,24 +43,31 @@ public class QuickFeedDiscoveryFragment extends Fragment implements AdapterView.
discoverMore.setOnClickListener(v ->
((MainActivity) getActivity()).loadChildFragment(new ItunesSearchFragment()));
- subscriptionGridLayout = root.findViewById(R.id.discover_grid);
+ discoverGridLayout = root.findViewById(R.id.discover_grid);
progressBar = root.findViewById(R.id.discover_progress_bar);
errorTextView = root.findViewById(R.id.discover_error);
adapter = new FeedDiscoverAdapter((MainActivity) getActivity());
- subscriptionGridLayout.setAdapter(adapter);
- subscriptionGridLayout.setOnItemClickListener(this);
+ discoverGridLayout.setAdapter(adapter);
+ discoverGridLayout.setOnItemClickListener(this);
+
+ DisplayMetrics displayMetrics = getContext().getResources().getDisplayMetrics();
+ float screenWidthDp = displayMetrics.widthPixels / displayMetrics.density;
+ if (screenWidthDp > 600) {
+ discoverGridLayout.setNumColumns(6);
+ } else {
+ discoverGridLayout.setNumColumns(4);
+ }
// Fill with dummy elements to have a fixed height and
// prevent the UI elements below from jumping on slow connections
List<PodcastSearchResult> dummies = new ArrayList<>();
- for (int i = 0; i < 8; i++) {
+ for (int i = 0; i < NUM_SUGGESTIONS; i++) {
dummies.add(PodcastSearchResult.dummy());
}
- adapter.updateData(dummies);
+ adapter.updateData(dummies);
loadToplist();
-
return root;
}
@@ -72,22 +81,22 @@ public class QuickFeedDiscoveryFragment extends Fragment implements AdapterView.
private void loadToplist() {
progressBar.setVisibility(View.VISIBLE);
- subscriptionGridLayout.setVisibility(View.INVISIBLE);
+ discoverGridLayout.setVisibility(View.INVISIBLE);
errorTextView.setVisibility(View.GONE);
ItunesTopListLoader loader = new ItunesTopListLoader(getContext());
- disposable = loader.loadToplist(8)
+ disposable = loader.loadToplist(NUM_SUGGESTIONS)
.subscribe(podcasts -> {
errorTextView.setVisibility(View.GONE);
progressBar.setVisibility(View.GONE);
- subscriptionGridLayout.setVisibility(View.VISIBLE);
+ discoverGridLayout.setVisibility(View.VISIBLE);
adapter.updateData(podcasts);
}, error -> {
Log.e(TAG, Log.getStackTraceString(error));
errorTextView.setText(error.getLocalizedMessage());
errorTextView.setVisibility(View.VISIBLE);
progressBar.setVisibility(View.GONE);
- subscriptionGridLayout.setVisibility(View.INVISIBLE);
+ discoverGridLayout.setVisibility(View.INVISIBLE);
});
}
diff --git a/app/src/main/res/layout/addfeed.xml b/app/src/main/res/layout/addfeed.xml
index 8b26332ed..3b9c0ffb4 100644
--- a/app/src/main/res/layout/addfeed.xml
+++ b/app/src/main/res/layout/addfeed.xml
@@ -13,6 +13,50 @@
app:title="@string/add_feed_label"
android:id="@+id/toolbar"/>
+ <androidx.cardview.widget.CardView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ app:cardCornerRadius="4dp"
+ app:cardElevation="4dp"
+ android:layout_marginLeft="16dp"
+ android:layout_marginRight="16dp"
+ android:layout_marginTop="16dp">
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal">
+
+ <ImageView
+ android:layout_width="40dp"
+ android:layout_height="match_parent"
+ android:layout_marginLeft="8dp"
+ android:layout_marginRight="8dp"
+ android:contentDescription="@string/search_podcast_hint"
+ app:srcCompat="?attr/action_search"
+ android:id="@+id/search_icon"
+ android:scaleType="center"/>
+
+ <EditText
+ android:id="@+id/combinedFeedSearchBox"
+ 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"/>
+
+ </LinearLayout>
+ </androidx.cardview.widget.CardView>
+
<ScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
@@ -24,170 +68,92 @@
android:layout_height="wrap_content"
android:orientation="vertical"
android:focusableInTouchMode="true"
- android:padding="8dp">
-
- <androidx.cardview.widget.CardView
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- app:cardCornerRadius="4dp"
- android:elevation="16dp"
- android:layout_margin="8dp">
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal">
-
- <ImageView
- android:layout_width="40dp"
- android:layout_height="match_parent"
- android:layout_marginLeft="8dp"
- android:layout_marginRight="8dp"
- android:contentDescription="@string/search_podcast_hint"
- app:srcCompat="?attr/action_search"
- android:id="@+id/search_icon"
- android:scaleType="center"/>
-
- <EditText
- android:id="@+id/combinedFeedSearchBox"
- 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"/>
-
- </LinearLayout>
-
- </androidx.cardview.widget.CardView>
+ android:padding="16dp">
<fragment
android:id="@+id/quickFeedDiscovery"
android:name="de.danoeh.antennapod.fragment.QuickFeedDiscoveryFragment"
android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_margin="8dp"/>
+ android:layout_height="wrap_content"/>
- <androidx.cardview.widget.CardView
+ <TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
- app:cardCornerRadius="4dp"
- android:elevation="8dp"
- android:layout_margin="8dp">
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:padding="16dp"
- android:orientation="vertical">
-
- <TextView
- android:id="@+id/txtvFeedurl"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="@string/txtvfeedurl_label"
- android:textSize="18sp"
- android:layout_marginBottom="8dp"
- android:layout_marginLeft="4dp"
- android:layout_marginStart="4dp"
- android:textColor="?android:attr/textColorPrimary"/>
-
- <EditText
- android:id="@+id/etxtFeedurl"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:cursorVisible="true"
- android:focusable="true"
- android:focusableInTouchMode="true"
- android:hint="@string/etxtFeedurlHint"
- android:inputType="textUri"/>
-
- <Button
- android:id="@+id/butConfirm"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="end"
- style="?android:attr/buttonBarButtonStyle"
- android:text="@string/confirm_label"/>
-
- </LinearLayout>
-
- </androidx.cardview.widget.CardView>
-
- <androidx.cardview.widget.CardView
+ android:text="@string/advanced"
+ android:textSize="18sp"
+ android:layout_marginTop="16dp"
+ android:layout_marginBottom="8dp"
+ android:textColor="?android:attr/textColorPrimary"/>
+
+ <TextView
+ android:id="@+id/btn_add_via_url"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- app:cardCornerRadius="4dp"
- android:elevation="8dp"
- android:layout_margin="8dp">
-
- <LinearLayout
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:padding="8dp"
- android:layout_gravity="center_horizontal"
- android:orientation="horizontal">
-
- <LinearLayout
- android:id="@+id/advanced_search"
- android:layout_width="120dp"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- android:gravity="center_horizontal"
- android:padding="8dp"
- android:background="?android:attr/selectableItemBackground">
-
- <ImageView
- android:layout_width="40dp"
- android:layout_height="match_parent"
- android:contentDescription="@string/advanced_search"
- app:srcCompat="?attr/action_search"
- android:scaleType="center"
- android:layout_marginBottom="4dp"/>
-
- <TextView
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="@string/advanced_search"
- android:textAlignment="center"
- android:textColor="?android:attr/textColorPrimary"/>
- </LinearLayout>
-
- <LinearLayout
- android:id="@+id/btn_opml_import"
- android:layout_width="120dp"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- android:gravity="center_horizontal"
- android:padding="8dp"
- android:background="?android:attr/selectableItemBackground">
-
- <ImageView
- android:layout_width="40dp"
- android:layout_height="match_parent"
- android:contentDescription="@string/opml_import_label"
- app:srcCompat="?attr/av_download"
- android:scaleType="center"
- android:layout_marginBottom="4dp"/>
-
- <TextView
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="@string/opml_import_label"
- android:textAlignment="center"
- android:textColor="?android:attr/textColorPrimary"/>
- </LinearLayout>
-
- </LinearLayout>
- </androidx.cardview.widget.CardView>
+ android:drawablePadding="8dp"
+ app:drawableStartCompat="?attr/content_new"
+ app:drawableLeftCompat="?attr/content_new"
+ android:paddingTop="8dp"
+ android:paddingBottom="8dp"
+ android:background="?android:attr/selectableItemBackground"
+ android:textColor="?android:attr/textColorPrimary"
+ android:clickable="true"
+ android:text="@string/add_podcast_by_url"/>
+
+ <TextView
+ android:id="@+id/btn_search_itunes"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:drawablePadding="8dp"
+ app:drawableStartCompat="?attr/action_search"
+ app:drawableLeftCompat="?attr/action_search"
+ android:paddingTop="8dp"
+ android:paddingBottom="8dp"
+ android:background="?android:attr/selectableItemBackground"
+ android:textColor="?android:attr/textColorPrimary"
+ android:clickable="true"
+ android:text="@string/search_itunes_label"/>
+
+ <TextView
+ android:id="@+id/btn_search_fyyd"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:drawablePadding="8dp"
+ app:drawableStartCompat="?attr/action_search"
+ app:drawableLeftCompat="?attr/action_search"
+ android:paddingTop="8dp"
+ android:paddingBottom="8dp"
+ android:background="?android:attr/selectableItemBackground"
+ android:textColor="?android:attr/textColorPrimary"
+ android:clickable="true"
+ android:text="@string/search_fyyd_label"/>
+
+ <TextView
+ android:id="@+id/btn_search_gpodder"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:drawablePadding="8dp"
+ app:drawableStartCompat="?attr/action_search"
+ app:drawableLeftCompat="?attr/action_search"
+ android:paddingTop="8dp"
+ android:paddingBottom="8dp"
+ android:background="?android:attr/selectableItemBackground"
+ android:textColor="?android:attr/textColorPrimary"
+ android:clickable="true"
+ android:text="@string/browse_gpoddernet_label"/>
+
+ <TextView
+ android:id="@+id/btn_opml_import"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:drawablePadding="8dp"
+ app:drawableStartCompat="?attr/av_download"
+ app:drawableLeftCompat="?attr/av_download"
+ android:paddingTop="8dp"
+ android:paddingBottom="8dp"
+ android:background="?android:attr/selectableItemBackground"
+ android:textColor="?android:attr/textColorPrimary"
+ android:clickable="true"
+ android:text="@string/opml_import_label"/>
</LinearLayout>
</ScrollView>
</LinearLayout>
diff --git a/app/src/main/res/layout/quick_feed_discovery.xml b/app/src/main/res/layout/quick_feed_discovery.xml
index 75a35a130..78a59c7eb 100644
--- a/app/src/main/res/layout/quick_feed_discovery.xml
+++ b/app/src/main/res/layout/quick_feed_discovery.xml
@@ -1,78 +1,65 @@
<?xml version="1.0" encoding="utf-8"?>
-<androidx.cardview.widget.CardView
+<LinearLayout
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="wrap_content"
- app:cardCornerRadius="4dp"
- android:elevation="16dp">
+ android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:padding="16dp"
- android:orientation="vertical">
+ android:orientation="horizontal">
+ <TextView
+ android:layout_width="0dip"
+ android:layout_height="wrap_content"
+ android:text="@string/discover"
+ android:textSize="18sp"
+ android:layout_marginBottom="8dp"
+ android:layout_weight="1"
+ android:textColor="?android:attr/textColorPrimary"/>
- <LinearLayout
- android:layout_width="match_parent"
+ <Button
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:orientation="horizontal">
- <TextView
- android:layout_width="0dip"
- android:layout_height="wrap_content"
- android:text="@string/discover"
- android:textSize="18sp"
- android:layout_marginBottom="8dp"
- android:layout_weight="1"
- android:layout_marginLeft="4dp"
- android:layout_marginStart="4dp"
- android:textColor="?android:attr/textColorPrimary"/>
+ android:minHeight="0dp"
+ android:minWidth="0dp"
+ android:text="@string/discover_more"
+ android:id="@+id/discover_more"
+ style="?android:attr/buttonBarButtonStyle"/>
+ </LinearLayout>
- <Button
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:minHeight="0dp"
- android:minWidth="0dp"
- android:text="@string/discover_more"
- android:id="@+id/discover_more"
- style="?android:attr/buttonBarButtonStyle"/>
- </LinearLayout>
+ <RelativeLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content">
- <RelativeLayout
+ <de.danoeh.antennapod.view.WrappingGridView
+ android:id="@+id/discover_grid"
android:layout_width="match_parent"
- android:layout_height="wrap_content">
-
- <de.danoeh.antennapod.view.WrappingGridView
- android:id="@+id/discover_grid"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:numColumns="4"
- app:layout_columnWeight="1"
- app:layout_rowWeight="1"
- android:scrollbars="none"
- android:layout_marginTop="8dp"
- android:layout_centerInParent="true"
- android:layout_gravity="center_horizontal"/>
-
- <ProgressBar
- android:id="@+id/discover_progress_bar"
- style="?android:attr/progressBarStyle"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center"
- android:layout_centerInParent="true"
- android:layout_marginTop="30dp"/>
-
- <TextView
- android:id="@+id/discover_error"
- android:textColor="@color/download_failed_red"
- android:layout_width="match_parent"
- android:layout_centerInParent="true"
- android:layout_height="wrap_content" />
-
- </RelativeLayout>
+ android:layout_height="wrap_content"
+ android:numColumns="4"
+ app:layout_columnWeight="1"
+ app:layout_rowWeight="1"
+ android:scrollbars="none"
+ android:layout_marginTop="8dp"
+ android:layout_centerInParent="true"
+ android:layout_gravity="center_horizontal"/>
- </LinearLayout>
+ <ProgressBar
+ android:id="@+id/discover_progress_bar"
+ style="?android:attr/progressBarStyle"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:layout_centerInParent="true"
+ android:layout_marginTop="30dp"/>
-</androidx.cardview.widget.CardView>
+ <TextView
+ android:id="@+id/discover_error"
+ android:textColor="@color/download_failed_red"
+ android:layout_width="match_parent"
+ android:layout_centerInParent="true"
+ android:layout_height="wrap_content"/>
+ </RelativeLayout>
+</LinearLayout>
diff --git a/app/src/main/res/menu/advanced_search.xml b/app/src/main/res/menu/advanced_search.xml
deleted file mode 100644
index 297ebfce8..000000000
--- a/app/src/main/res/menu/advanced_search.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<menu xmlns:android="http://schemas.android.com/apk/res/android">
-
- <item
- android:id="@+id/search_itunes"
- android:title="@string/search_itunes_label" />
- <item
- android:id="@+id/search_gpodder"
- android:title="@string/browse_gpoddernet_label" />
- <item
- android:id="@+id/search_fyyd"
- android:title="@string/search_fyyd_label" />
-
-</menu>