Let filter button height grow (#6477)
Also, make it easier to see what option is selected
This commit is contained in:
parent
da16f13e8b
commit
b8a1c1f49a
@ -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());
|
||||
}
|
||||
|
||||
|
@ -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());
|
||||
}
|
||||
|
||||
|
@ -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>
|
||||
|
6
core/src/main/res/color/button_bg_selector.xml
Normal file
6
core/src/main/res/color/button_bg_selector.xml
Normal 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>
|
@ -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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user