summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormueller-ma <mueller-ma@users.noreply.github.com>2023-05-07 11:08:27 +0200
committerGitHub <noreply@github.com>2023-05-07 11:08:27 +0200
commitda16f13e8bcaa92333557823eef23f7c15636555 (patch)
tree3ecc1d67510bb518c38e7ea8b842a56cc9966fde
parenteaae6585d60be4c2796d650ab2d7ee15a7d88c6a (diff)
downloadAntennaPod-da16f13e8bcaa92333557823eef23f7c15636555.zip
Make single filter button full-width (#6454)
-rw-r--r--app/src/main/java/de/danoeh/antennapod/dialog/SubscriptionsFilterDialog.java5
-rw-r--r--app/src/main/res/layout/filter_dialog_row.xml1
2 files changed, 4 insertions, 2 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/dialog/SubscriptionsFilterDialog.java b/app/src/main/java/de/danoeh/antennapod/dialog/SubscriptionsFilterDialog.java
index fd4b3e238..1aedfcf8b 100644
--- a/app/src/main/java/de/danoeh/antennapod/dialog/SubscriptionsFilterDialog.java
+++ b/app/src/main/java/de/danoeh/antennapod/dialog/SubscriptionsFilterDialog.java
@@ -10,7 +10,6 @@ import android.widget.LinearLayout;
import com.google.android.material.button.MaterialButtonToggleGroup;
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
-import de.danoeh.antennapod.databinding.FilterDialogRowBinding;
import org.greenrobot.eventbus.EventBus;
import java.util.Arrays;
@@ -18,9 +17,10 @@ import java.util.HashSet;
import java.util.Set;
import de.danoeh.antennapod.R;
+import de.danoeh.antennapod.core.feed.SubscriptionsFilterGroup;
+import de.danoeh.antennapod.databinding.FilterDialogRowBinding;
import de.danoeh.antennapod.event.UnreadItemsUpdateEvent;
import de.danoeh.antennapod.model.feed.SubscriptionsFilter;
-import de.danoeh.antennapod.core.feed.SubscriptionsFilterGroup;
import de.danoeh.antennapod.storage.preferences.UserPreferences;
public class SubscriptionsFilterDialog {
@@ -37,6 +37,7 @@ public class SubscriptionsFilterDialog {
for (SubscriptionsFilterGroup item : SubscriptionsFilterGroup.values()) {
FilterDialogRowBinding binding = FilterDialogRowBinding.inflate(inflater);
+ binding.buttonGroup.setWeightSum(item.values.length);
binding.filterButton1.setText(item.values[0].displayName);
binding.filterButton1.setTag(item.values[0].filterId);
if (item.values.length == 2) {
diff --git a/app/src/main/res/layout/filter_dialog_row.xml b/app/src/main/res/layout/filter_dialog_row.xml
index a551b5db9..cc397df02 100644
--- a/app/src/main/res/layout/filter_dialog_row.xml
+++ b/app/src/main/res/layout/filter_dialog_row.xml
@@ -2,6 +2,7 @@
<com.google.android.material.button.MaterialButtonToggleGroup
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
+ android:id="@+id/buttonGroup"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:weightSum="2"