widget: fix wafer cover setup

Apparently:
1. Some OEMs don't actually autocrop to rounded corners
2. I was not correctly using the right corner radius attributes in the
first place, making it inconsistent.

Let's fix that.

Closes #730
This commit is contained in:
Alexander Capehart
2024-04-07 23:25:52 -06:00
parent dbfe9927bf
commit 3ca9b515cf
11 changed files with 32 additions and 24 deletions
@@ -61,7 +61,7 @@
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_gravity="center"
android:background="@drawable/ui_widget_bar_system"
android:background="@drawable/ui_widget_bg_round"
android:backgroundTint="?attr/colorSurface"
android:orientation="horizontal"
android:padding="@dimen/spacing_mid_medium">
@@ -48,7 +48,7 @@
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_gravity="center"
android:background="@drawable/ui_widget_bar_system"
android:background="@drawable/ui_widget_bg_round"
android:backgroundTint="?attr/colorSurface"
android:orientation="horizontal"
android:padding="@dimen/spacing_mid_medium">
+1 -1
View File
@@ -4,7 +4,7 @@
android:id="@android:id/background"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/ui_widget_bg_system"
android:background="@drawable/ui_widget_bg_sharp"
android:backgroundTint="?attr/colorSurface"
android:theme="@style/Theme.Auxio.Widget">
+1 -1
View File
@@ -4,7 +4,7 @@
android:id="@android:id/background"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/ui_widget_bg_system"
android:background="@drawable/ui_widget_bg_sharp"
android:backgroundTint="?attr/colorSurface"
android:theme="@style/Theme.Auxio.Widget">
@@ -4,7 +4,7 @@
android:id="@android:id/background"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/ui_widget_bg_system"
android:background="@drawable/ui_widget_bg_sharp"
android:backgroundTint="?attr/colorSurface"
android:baselineAligned="false"
android:orientation="horizontal"
@@ -20,6 +20,8 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:background="@drawable/ui_widget_bg_round"
android:clipToOutline="true"
tools:ignore="ContentDescription" />
<android.widget.LinearLayout
@@ -4,22 +4,23 @@
android:id="@android:id/background"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/ui_widget_bg_system"
android:background="@drawable/ui_widget_bg_sharp"
android:backgroundTint="?attr/colorSurface"
android:baselineAligned="false"
android:orientation="horizontal"
android:theme="@style/Theme.Auxio.Widget">
<!--
Wrapping the 1:1 ImageView hack in a LinearLayout allows the view to measure greedily
without squishing the controls.
clipToOutline won't actually do anything before Android 12, but that's fine since we won't
show a cover then anyway.
-->
<android.widget.ImageView
android:id="@+id/widget_cover"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:background="@drawable/ui_widget_bg_round"
android:clipToOutline="true"
tools:ignore="ContentDescription" />
<android.widget.LinearLayout