Make single filter button full-width (#6454)

This commit is contained in:
mueller-ma 2023-05-07 11:08:27 +02:00 committed by GitHub
parent eaae6585d6
commit da16f13e8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -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) {

View File

@ -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"