Let filter button height grow (#6477)

Also, make it easier to see what option is selected
This commit is contained in:
ByteHamster 2023-05-07 11:28:41 +02:00 committed by GitHub
parent da16f13e8b
commit b8a1c1f49a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 22 additions and 4 deletions

View File

@ -47,6 +47,10 @@ public abstract class ItemFilterDialog extends BottomSheetDialogFragment {
binding.filterButton1.setTag(item.values[0].filterId);
binding.filterButton2.setText(item.values[1].displayName);
binding.filterButton2.setTag(item.values[1].filterId);
binding.filterButton1.setMaxLines(3);
binding.filterButton1.setSingleLine(false);
binding.filterButton2.setMaxLines(3);
binding.filterButton2.setSingleLine(false);
rows.addView(binding.getRoot());
}

View File

@ -46,6 +46,10 @@ public class SubscriptionsFilterDialog {
} else {
binding.filterButton2.setVisibility(View.GONE);
}
binding.filterButton1.setMaxLines(3);
binding.filterButton1.setSingleLine(false);
binding.filterButton2.setMaxLines(3);
binding.filterButton2.setSingleLine(false);
rows.addView(binding.getRoot());
}

View File

@ -11,15 +11,15 @@
<Button
android:id="@+id/filterButton1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
style="?attr/materialButtonOutlinedStyle" />
style="@style/OutlinedButtonBetterContrast" />
<Button
android:id="@+id/filterButton2"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
style="?attr/materialButtonOutlinedStyle" />
style="@style/OutlinedButtonBetterContrast" />
</com.google.android.material.button.MaterialButtonToggleGroup>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Difference to Material Components: alpha is 0.3 instead of 0.08 -->
<item android:alpha="0.3" android:color="?attr/colorPrimary" android:state_checked="true"/>
<item android:color="@android:color/transparent" android:state_checked="false"/>
</selector>

View File

@ -253,6 +253,10 @@
<item name="android:ellipsize">end</item>
</style>
<style name="OutlinedButtonBetterContrast" parent="Widget.Material3.Button.OutlinedButton">
<item name="backgroundTint">@color/button_bg_selector</item>
</style>
<style name="ProgressBarLight">
<item name="android:indeterminateOnly">false</item>
<item name="android:progressDrawable">@drawable/progress_bar_horizontal_light</item>