diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/adapter/NavListAdapter.java | 11 | ||||
-rw-r--r-- | app/src/main/res/layout/nav_section_item.xml | 38 |
2 files changed, 31 insertions, 18 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/NavListAdapter.java b/app/src/main/java/de/danoeh/antennapod/adapter/NavListAdapter.java index 3e382e79e..8d220c90d 100644 --- a/app/src/main/java/de/danoeh/antennapod/adapter/NavListAdapter.java +++ b/app/src/main/java/de/danoeh/antennapod/adapter/NavListAdapter.java @@ -14,6 +14,7 @@ import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; +import android.widget.LinearLayout; import android.widget.RelativeLayout; import android.widget.TextView; import com.bumptech.glide.load.resource.bitmap.FitCenter; @@ -22,7 +23,6 @@ import com.google.android.material.dialog.MaterialAlertDialogBuilder; import androidx.recyclerview.widget.RecyclerView; import com.bumptech.glide.Glide; import com.bumptech.glide.request.RequestOptions; -import com.joanzapata.iconify.Iconify; import de.danoeh.antennapod.R; import de.danoeh.antennapod.activity.PreferenceActivity; import de.danoeh.antennapod.fragment.AllEpisodesFragment; @@ -260,10 +260,8 @@ public class NavListAdapter extends RecyclerView.Adapter<NavListAdapter.Holder> // don't count episodes that can be reclaimed int spaceUsed = itemAccess.getNumberOfDownloadedItems() - itemAccess.getReclaimableItems(); - if (epCacheSize > 0 && spaceUsed >= epCacheSize) { - holder.count.setText("{md-disc-full 150%}"); - Iconify.addIcons(holder.count); + holder.count.setCompoundDrawablesRelativeWithIntrinsicBounds(0, 0, R.drawable.ic_disc_full, 0); holder.count.setVisibility(View.VISIBLE); holder.count.setOnClickListener(v -> new MaterialAlertDialogBuilder(context) @@ -291,9 +289,6 @@ public class NavListAdapter extends RecyclerView.Adapter<NavListAdapter.Holder> if (UserPreferences.getSubscriptionsFilter().isEnabled() && showSubscriptionList) { holder.itemView.setEnabled(true); - holder.feedsFilteredMsg.setText("{md-info-outline} " - + context.getString(R.string.subscriptions_are_filtered)); - Iconify.addIcons(holder.feedsFilteredMsg); holder.feedsFilteredMsg.setVisibility(View.VISIBLE); } else { holder.itemView.setEnabled(false); @@ -361,7 +356,7 @@ public class NavListAdapter extends RecyclerView.Adapter<NavListAdapter.Holder> } static class DividerHolder extends Holder { - final TextView feedsFilteredMsg; + final LinearLayout feedsFilteredMsg; public DividerHolder(@NonNull View itemView) { super(itemView); diff --git a/app/src/main/res/layout/nav_section_item.xml b/app/src/main/res/layout/nav_section_item.xml index fb3021556..bdb7b28ee 100644 --- a/app/src/main/res/layout/nav_section_item.xml +++ b/app/src/main/res/layout/nav_section_item.xml @@ -1,11 +1,12 @@ <?xml version="1.0" encoding="utf-8"?> -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" +<LinearLayout + xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@android:color/transparent" - android:orientation="vertical" android:importantForAccessibility="no" + android:orientation="vertical" android:paddingTop="8dp" android:paddingBottom="8dp"> @@ -13,16 +14,33 @@ android:layout_width="match_parent" android:layout_height="1dp" android:background="?android:attr/listDivider" - tools:background="@android:color/holo_red_dark"/> + tools:background="@android:color/holo_red_dark" /> - <TextView + <LinearLayout android:id="@+id/nav_feeds_filtered_message" android:layout_width="match_parent" android:layout_height="wrap_content" - android:gravity="start" - android:paddingStart="@dimen/listitem_icon_leftpadding" - android:paddingTop="4dp" - android:paddingEnd="@dimen/listitem_icon_leftpadding" - android:textColor="?android:attr/textColorSecondary" - android:textSize="@dimen/text_size_small" /> + android:importantForAccessibility="no" + android:orientation="horizontal"> + + <ImageView + android:layout_width="20dp" + android:layout_height="20dp" + android:layout_marginStart="16dp" + android:layout_marginTop="4dp" + android:src="@drawable/ic_info" /> + + <TextView + android:id="@+id/nav_feeds_filtered_message_text" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginStart="4dp" + android:gravity="start" + android:paddingTop="4dp" + android:text="@string/subscriptions_are_filtered" + android:textColor="?android:attr/textColorSecondary" + android:textSize="@dimen/text_size_small" /> + + </LinearLayout> + </LinearLayout> |