From 1e58ec33fc92bb822fda91d79ecdc636bbab471e Mon Sep 17 00:00:00 2001 From: Nishith Khanna Date: Thu, 19 Oct 2023 12:51:36 +0530 Subject: [PATCH] Make ui improvements in update list - Available updates background is same as toolbar - Card corner radius has been made zero - Update action button position has been changed which fixes the issue of text getting hidden when button text is too long in some translations - Other elements in update card have been adjusted too to make it look better with new position of button --- app/src/main/res/layout/activity_updates.xml | 2 +- app/src/main/res/layout/update_item_view.xml | 189 +++++++++---------- 2 files changed, 95 insertions(+), 96 deletions(-) diff --git a/app/src/main/res/layout/activity_updates.xml b/app/src/main/res/layout/activity_updates.xml index 594cfbac..871ac035 100644 --- a/app/src/main/res/layout/activity_updates.xml +++ b/app/src/main/res/layout/activity_updates.xml @@ -140,7 +140,7 @@ android:paddingBottom="24dp" android:paddingStart="16dp" android:textSize="16sp" - android:background="?attr/colorPrimary" + android:background="@color/toolbar_collapsed" android:text="@string/e_available_updates" android:textColor="?android:textColorPrimary" /> diff --git a/app/src/main/res/layout/update_item_view.xml b/app/src/main/res/layout/update_item_view.xml index 8c29dc79..fdecfead 100644 --- a/app/src/main/res/layout/update_item_view.xml +++ b/app/src/main/res/layout/update_item_view.xml @@ -8,112 +8,60 @@ android:focusable="true" android:foreground="?attr/selectableItemBackground" android:nextFocusRight="@+id/update_action" - android:layout_marginTop="8dp" - android:layout_marginStart="8dp" - android:layout_marginEnd="8dp" - app:cardCornerRadius="16dp" + app:cardCornerRadius="0dp" app:contentPadding="16dp"> + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_weight="1" + android:orientation="vertical"> - - - - + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="horizontal" + android:weightSum="1" + android:baselineAligned="false"> - + android:layout_weight="1" + android:orientation="vertical"> - - - - - - - - + android:alpha="0.87" + android:drawablePadding="8dp" + android:maxLines="1" + android:paddingBottom="8sp" + android:textColor="?android:attr/textColorPrimary" + android:textSize="16sp" + tools:text="LineageOS 20" /> - - - - + android:maxLines="1" + android:textSize="14sp" + tools:text="18 June 2023" /> + -