summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/src/main/java/de/danoeh/antennapod/adapter/NavListAdapter.java11
-rw-r--r--app/src/main/res/layout/nav_section_item.xml38
-rw-r--r--core/src/main/res/drawable/ic_disc_full.xml9
3 files changed, 40 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>
diff --git a/core/src/main/res/drawable/ic_disc_full.xml b/core/src/main/res/drawable/ic_disc_full.xml
new file mode 100644
index 000000000..2aba1bc53
--- /dev/null
+++ b/core/src/main/res/drawable/ic_disc_full.xml
@@ -0,0 +1,9 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="20dp"
+ android:height="16dp"
+ android:viewportWidth="20"
+ android:viewportHeight="16">
+ <path
+ android:pathData="M17.1 11.5s0-1.7 0-1.7s1.8 0 1.8 0s0 1.7 0 1.7s-1.8 0-1.8 0zm0-8s1.8 0 1.8 0s0 4.5 0 4.5s-1.8 0-1.8 0s0-4.5 0-4.5zm-8.9-2.6c2 0 3.6 0.7 5 2.1s2.1 3 2.1 5s-0.7 3.7-2.1 5s-3 2.1-5 2.1c-1.9 0-3.6-0.7-5-2.1s-2.1-3-2.1-5s0.7-3.6 2.1-5s3.1-2.1 5-2.1zm0 8.9c0.5 0 0.9-0.2 1.3-0.5s0.5-0.8 0.5-1.3s-0.2-0.9-0.5-1.3s-0.8-0.5-1.3-0.5s-0.9 0.2-1.2 0.5s-0.6 0.8-0.6 1.3s0.2 0.9 0.6 1.3s0.7 0.5 1.2 0.5z"
+ android:fillColor="?android:attr/textColorPrimary" />
+</vector> \ No newline at end of file