summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author TYM Tsai <tymtsai@google.com> 2022-06-03 18:58:58 +0800
committer TYM Tsai <tymtsai@google.com> 2022-06-07 01:02:30 +0800
commita60358c00c1645ca39893cccbc6ff195c6ae932b (patch)
tree97009f9eb1743780ca03b85f0ad95ef7a033a8e2
parentd59d17d74a8fe4addaedd2fe31bf2329bc0136c3 (diff)
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
-rw-r--r--core/res/res/layout/autofill_fill_dialog.xml38
-rw-r--r--core/res/res/layout/autofill_save.xml2
-rw-r--r--core/res/res/values/dimens.xml2
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 a9af187ee930..c382a6577857 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" />
- <LinearLayout
+ <ListView
+ android:id="@+id/autofill_dialog_list"
+ android:layout_weight="1"
android:layout_width="fill_parent"
- android:layout_height="wrap_content"
+ android:layout_height="0dp"
+ android:paddingBottom="24dp"
android:layout_marginStart="24dp"
android:layout_marginEnd="24dp"
- android:theme="@style/Theme.DeviceDefault.AutofillHalfScreenDialogList"
- android:orientation="vertical">
- <ListView
- android:id="@+id/autofill_dialog_list"
- android:layout_weight="1"
- android:layout_width="fill_parent"
- android:layout_height="0dp"
- android:drawSelectorOnTop="true"
- android:clickable="true"
- android:divider="@drawable/list_divider_material"
- android:background="@drawable/autofill_dataset_picker_background"
- android:visibility="gone"/>
- </LinearLayout>
+ android:clipToPadding="false"
+ android:drawSelectorOnTop="true"
+ android:clickable="true"
+ android:divider="@null"
+ android:visibility="gone" />
<com.android.internal.widget.ButtonBarLayout
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_gravity="end"
- android:clipToPadding="false"
- android:layout_marginTop="32dp"
+ android:layout_marginTop="8dp"
android:layout_marginBottom="18dp"
android:layout_marginStart="24dp"
android:layout_marginEnd="24dp"
diff --git a/core/res/res/layout/autofill_save.xml b/core/res/res/layout/autofill_save.xml
index 5381017c26d6..fd08241deb3a 100644
--- a/core/res/res/layout/autofill_save.xml
+++ b/core/res/res/layout/autofill_save.xml
@@ -29,7 +29,6 @@
android:layout_marginTop="@dimen/autofill_save_outer_top_margin"
android:layout_marginStart="24dp"
android:layout_marginEnd="24dp"
- android:elevation="@dimen/autofill_elevation"
android:background="?android:attr/colorSurface"
android:gravity="center_horizontal"
android:orientation="vertical">
@@ -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">
</TextView>
diff --git a/core/res/res/values/dimens.xml b/core/res/res/values/dimens.xml
index bb36ededc581..b754100a3ed6 100644
--- a/core/res/res/values/dimens.xml
+++ b/core/res/res/values/dimens.xml
@@ -873,7 +873,7 @@
<dimen name="autofill_save_title_start_padding">8dp</dimen>
<dimen name="autofill_save_scroll_view_top_margin">16dp</dimen>
<dimen name="autofill_save_button_bar_padding">16dp</dimen>
- <dimen name="autofill_dialog_corner_radius">28dp</dimen>
+ <dimen name="autofill_dialog_corner_radius">24dp</dimen>
<!-- Max height of the the autofill save custom subtitle as a fraction of the screen width/height -->
<dimen name="autofill_save_custom_subtitle_max_height">20%</dimen>