From a5bbaf595b1b2138f8a50acf20bc051c58a420e0 Mon Sep 17 00:00:00 2001 From: Mike Scamell Date: Tue, 29 Oct 2024 17:55:33 +0000 Subject: [PATCH 1/3] fix minimum height in RadioListItem The minHeight of the RadioButton was stopping the item shrinking to it's minHeight of 48dp when it was eligible to do so --- common/common-ui/src/main/res/layout/view_radio_list_item.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/common/common-ui/src/main/res/layout/view_radio_list_item.xml b/common/common-ui/src/main/res/layout/view_radio_list_item.xml index 24b9f26e56b3..b1682a3e9ad9 100644 --- a/common/common-ui/src/main/res/layout/view_radio_list_item.xml +++ b/common/common-ui/src/main/res/layout/view_radio_list_item.xml @@ -32,6 +32,7 @@ android:layout_height="wrap_content" android:layout_marginStart="@dimen/keyline_3" android:minWidth="0dp" + android:minHeight="0dp" android:padding="0dp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintStart_toStartOf="parent" From 928e03e8696a203a5291dcacbef6117b3adeb293 Mon Sep 17 00:00:00 2001 From: Mike Scamell Date: Tue, 29 Oct 2024 17:53:44 +0000 Subject: [PATCH 2/3] allow setting of minHeight This was the easiest way to allow 48dp for ShowOnAppLaunch and 64dp for VPN countries which we do in the next commit --- .../res/layout/activity_show_on_app_launch_setting.xml | 3 +++ .../duckduckgo/common/ui/view/listitem/RadioListItem.kt | 7 +++++++ .../src/main/res/values/attrs-radio-list-item.xml | 1 + 3 files changed, 11 insertions(+) diff --git a/app/src/main/res/layout/activity_show_on_app_launch_setting.xml b/app/src/main/res/layout/activity_show_on_app_launch_setting.xml index cfc1e3a78e63..bc42e01d64c0 100644 --- a/app/src/main/res/layout/activity_show_on_app_launch_setting.xml +++ b/app/src/main/res/layout/activity_show_on_app_launch_setting.xml @@ -40,18 +40,21 @@ android:id="@+id/lastOpenedTabCheckListItem" android:layout_width="match_parent" android:layout_height="wrap_content" + android:minHeight="@dimen/oneLineItemHeight" app:primaryText="Last Opened Tab" /> + \ No newline at end of file From 6545f3797b008ed90bfb575191cb72794654874e Mon Sep 17 00:00:00 2001 From: Mike Scamell Date: Tue, 29 Oct 2024 17:38:57 +0000 Subject: [PATCH 3/3] fix minHeight too small for vpn locations Now that we can actually shrink to 48dp we need to ensure that the vpn country items match their existing height of 64dp as a result This was the least intrusive way to fix these issues before following up later with additions to OneLineListItem and TwoLineListItem --- .../src/main/res/layout/item_geoswitching_country.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/network-protection/network-protection-impl/src/main/res/layout/item_geoswitching_country.xml b/network-protection/network-protection-impl/src/main/res/layout/item_geoswitching_country.xml index e0ac9373fe5e..0b0da49cec20 100644 --- a/network-protection/network-protection-impl/src/main/res/layout/item_geoswitching_country.xml +++ b/network-protection/network-protection-impl/src/main/res/layout/item_geoswitching_country.xml @@ -18,4 +18,5 @@ xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="wrap_content" + android:minHeight="@dimen/twoLineItemWithLargeImageHeight" app:leadingIconBackground="circular" /> \ No newline at end of file