diff options
6 files changed, 17 insertions, 18 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/ui/screen/AllEpisodesFragment.java b/app/src/main/java/de/danoeh/antennapod/ui/screen/AllEpisodesFragment.java index 6e48ade39..f555a9137 100644 --- a/app/src/main/java/de/danoeh/antennapod/ui/screen/AllEpisodesFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/ui/screen/AllEpisodesFragment.java @@ -119,14 +119,14 @@ public class AllEpisodesFragment extends EpisodesListFragment { private void updateFilterUi() { swipeActions.setFilter(getFilter()); - if (listAdapter.inActionMode()) { + if (getFilter().getValues().length == 0) { + txtvInformation.setVisibility(View.GONE); + emptyView.setMessage(R.string.no_all_episodes_label); + } else if (listAdapter.inActionMode()) { txtvInformation.setVisibility(View.INVISIBLE); - } else if (getFilter().getValues().length > 0) { + } else { txtvInformation.setVisibility(View.VISIBLE); emptyView.setMessage(R.string.no_all_episodes_filtered_label); - } else { - txtvInformation.setVisibility(View.GONE); - emptyView.setMessage(R.string.no_all_episodes_label); } toolbar.getMenu().findItem(R.id.action_favorites).setIcon( getFilter().showIsFavorite ? R.drawable.ic_star : R.drawable.ic_star_border); diff --git a/app/src/main/java/de/danoeh/antennapod/ui/screen/subscriptions/SubscriptionFragment.java b/app/src/main/java/de/danoeh/antennapod/ui/screen/subscriptions/SubscriptionFragment.java index c7bc579b1..31b1e7d26 100644 --- a/app/src/main/java/de/danoeh/antennapod/ui/screen/subscriptions/SubscriptionFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/ui/screen/subscriptions/SubscriptionFragment.java @@ -325,12 +325,12 @@ public class SubscriptionFragment extends Fragment } private void updateFilterVisibility() { - if (subscriptionAdapter.inActionMode()) { + if (!UserPreferences.getSubscriptionsFilter().isEnabled()) { + feedsFilteredMsg.setVisibility(View.GONE); + } else if (subscriptionAdapter.inActionMode()) { feedsFilteredMsg.setVisibility(View.INVISIBLE); - } else if (UserPreferences.getSubscriptionsFilter().isEnabled()) { - feedsFilteredMsg.setVisibility(View.VISIBLE); } else { - feedsFilteredMsg.setVisibility(View.GONE); + feedsFilteredMsg.setVisibility(View.VISIBLE); } } diff --git a/app/src/main/java/de/danoeh/antennapod/ui/screen/subscriptions/SubscriptionViewHolder.java b/app/src/main/java/de/danoeh/antennapod/ui/screen/subscriptions/SubscriptionViewHolder.java index b28c50bd1..bf5239f8c 100644 --- a/app/src/main/java/de/danoeh/antennapod/ui/screen/subscriptions/SubscriptionViewHolder.java +++ b/app/src/main/java/de/danoeh/antennapod/ui/screen/subscriptions/SubscriptionViewHolder.java @@ -10,13 +10,13 @@ import androidx.annotation.NonNull; import androidx.appcompat.content.res.AppCompatResources; import androidx.cardview.widget.CardView; import androidx.recyclerview.widget.RecyclerView; -import com.google.android.material.elevation.SurfaceColors; import de.danoeh.antennapod.R; import de.danoeh.antennapod.activity.MainActivity; import de.danoeh.antennapod.model.feed.Feed; import de.danoeh.antennapod.storage.database.NavDrawerData; import de.danoeh.antennapod.storage.preferences.UserPreferences; import de.danoeh.antennapod.ui.CoverLoader; +import de.danoeh.antennapod.ui.common.ThemeUtils; import java.lang.ref.WeakReference; import java.text.NumberFormat; @@ -84,8 +84,8 @@ public class SubscriptionViewHolder extends RecyclerView.ViewHolder { coverLoader.load(); if (card != null) { - float density = mainActivityRef.get().getResources().getDisplayMetrics().density; - card.setCardBackgroundColor(SurfaceColors.getColorForElevation(mainActivityRef.get(), 1 * density)); + card.setCardBackgroundColor(ThemeUtils.getColorFromAttr( + mainActivityRef.get(), R.attr.colorSurfaceContainer)); } int textPadding = columnCount <= 3 ? 16 : 8; diff --git a/app/src/main/java/de/danoeh/antennapod/ui/screen/subscriptions/SubscriptionsRecyclerAdapter.java b/app/src/main/java/de/danoeh/antennapod/ui/screen/subscriptions/SubscriptionsRecyclerAdapter.java index 2ca09ff4f..1a243a250 100644 --- a/app/src/main/java/de/danoeh/antennapod/ui/screen/subscriptions/SubscriptionsRecyclerAdapter.java +++ b/app/src/main/java/de/danoeh/antennapod/ui/screen/subscriptions/SubscriptionsRecyclerAdapter.java @@ -85,7 +85,6 @@ public class SubscriptionsRecyclerAdapter extends SelectableAdapter<Subscription holder.selectCheckbox.setVisibility(View.VISIBLE); } holder.selectView.setVisibility(isFeed ? View.VISIBLE : View.GONE); - holder.coverImage.setAlpha(0.6f); holder.selectCheckbox.setChecked((isSelected(position))); holder.selectCheckbox.setOnCheckedChangeListener((buttonView, isChecked) -> setSelected(holder.getBindingAdapterPosition(), isChecked)); @@ -102,7 +101,6 @@ public class SubscriptionsRecyclerAdapter extends SelectableAdapter<Subscription if (holder.selectView != null) { holder.selectCheckbox.setVisibility(View.GONE); holder.selectView.setVisibility(View.GONE); - holder.coverImage.setAlpha(1.0f); } } diff --git a/app/src/main/res/layout/subscription_grid_item.xml b/app/src/main/res/layout/subscription_grid_item.xml index f5130a020..d4596081a 100644 --- a/app/src/main/res/layout/subscription_grid_item.xml +++ b/app/src/main/res/layout/subscription_grid_item.xml @@ -7,6 +7,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding="4dp" + android:clipToPadding="false" tools:layout_width="150dp"> <androidx.cardview.widget.CardView @@ -16,7 +17,7 @@ android:clickable="false" android:foreground="?attr/selectableItemBackground" app:cardCornerRadius="12dp" - app:cardElevation="0dp"> + app:cardElevation="1dp"> <LinearLayout android:layout_width="wrap_content" @@ -112,7 +113,7 @@ android:layout_height="wrap_content" android:minWidth="0dp" android:minHeight="0dp" - android:layout_margin="8dp" /> + android:layout_margin="4dp" /> </FrameLayout> diff --git a/ui/common/src/main/res/drawable/ic_checkbox_background.xml b/ui/common/src/main/res/drawable/ic_checkbox_background.xml index 470ac4a5c..9ec3a4239 100644 --- a/ui/common/src/main/res/drawable/ic_checkbox_background.xml +++ b/ui/common/src/main/res/drawable/ic_checkbox_background.xml @@ -1,6 +1,6 @@ <vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="56dp" - android:height="56dp" + android:width="48dp" + android:height="48dp" android:viewportWidth="15.1" android:viewportHeight="15.1"> <path |