Modes icon picker: measuring improvements
Ensure that horizontal spacing between items in the icon picker is distributed to the left and right of the row instead of between the items. This makes the horizontal and vertical spacing the same.
Bug: 359171199
Test: manual + hsv
Flag: android.app.modes_ui
Change-Id: I68c3860ba4092bb6fde2a1218b3f6a95d0c373da
diff --git a/res/layout/modes_icon_list.xml b/res/layout/modes_icon_list.xml
index 87e647e..f6f2202 100644
--- a/res/layout/modes_icon_list.xml
+++ b/res/layout/modes_icon_list.xml
@@ -24,7 +24,7 @@
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/icon_list"
- android:layout_width="0dp"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clipToPadding="true"
android:nestedScrollingEnabled="false"
diff --git a/res/layout/modes_icon_list_item.xml b/res/layout/modes_icon_list_item.xml
index 72aef52..df511ca 100644
--- a/res/layout/modes_icon_list_item.xml
+++ b/res/layout/modes_icon_list_item.xml
@@ -17,10 +17,9 @@
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
+ android:layout_width="@dimen/zen_mode_icon_list_item_size"
android:layout_height="@dimen/zen_mode_icon_list_item_size"
android:clickable="true">
- <!-- width is match_parent to distribute remaining horizontal space -->
<ImageView
android:id="@+id/icon_image_view"