From a60358c00c1645ca39893cccbc6ff195c6ae932b Mon Sep 17 00:00:00 2001 From: TYM Tsai Date: Fri, 3 Jun 2022 18:58:58 +0800 Subject: [PATCH] Adjust the bottom sheet and save UI 1. Add 24dp padding between the title and body. 2. Adjust the padding between body and bottom buttons 3. Modify background of the list view in the bottom sheet. 4. Fix buttons are cut off when there are too many suggestions in the bottom sheet. Bug: 234061218 Bug: 234150685 Test: Manual check the UI for one suggestion, 8 suggestions, light and dark theme Change-Id: I6420c24bf9aad8de3bd676a69fd16e79ff598625 --- core/res/res/layout/autofill_fill_dialog.xml | 38 +++++++++----------- core/res/res/layout/autofill_save.xml | 2 +- core/res/res/values/dimens.xml | 2 +- 3 files changed, 18 insertions(+), 24 deletions(-) diff --git a/core/res/res/layout/autofill_fill_dialog.xml b/core/res/res/layout/autofill_fill_dialog.xml index a9af187ee9301..c382a6577857d 100644 --- a/core/res/res/layout/autofill_fill_dialog.xml +++ b/core/res/res/layout/autofill_fill_dialog.xml @@ -27,7 +27,8 @@ android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="center_horizontal" - android:paddingTop="24dp" + android:layout_marginTop="@dimen/autofill_save_outer_top_margin" + android:layout_marginBottom="24dp" android:layout_marginStart="24dp" android:layout_marginEnd="24dp" android:orientation="vertical"> @@ -44,6 +45,7 @@ android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="center_horizontal" + android:layout_marginTop="16dp" android:paddingStart="@dimen/autofill_save_inner_padding" android:paddingEnd="@dimen/autofill_save_inner_padding" android:visibility="gone" /> @@ -55,38 +57,30 @@ android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="center_horizontal" - android:paddingStart="@dimen/autofill_save_inner_padding" - android:paddingEnd="@dimen/autofill_save_inner_padding" android:visibility="gone" + android:paddingBottom="24dp" android:layout_marginStart="24dp" - android:layout_marginEnd="24dp" - android:background="@drawable/autofill_dataset_picker_background"/> + android:layout_marginEnd="24dp" /> - - - + android:clipToPadding="false" + android:drawSelectorOnTop="true" + android:clickable="true" + android:divider="@null" + android:visibility="gone" /> @@ -52,6 +51,7 @@ android:layout_height="wrap_content" android:text="@string/autofill_save_title" android:layout_marginTop="16dp" + android:paddingBottom="24dp" android:gravity="center" android:textAppearance="@style/AutofillSaveUiTitle"> diff --git a/core/res/res/values/dimens.xml b/core/res/res/values/dimens.xml index bb36ededc5819..b754100a3ed68 100644 --- a/core/res/res/values/dimens.xml +++ b/core/res/res/values/dimens.xml @@ -873,7 +873,7 @@ 8dp 16dp 16dp - 28dp + 24dp 20%