From 144823ce668b0c241f8b151f9dcd19c751961a52 Mon Sep 17 00:00:00 2001 From: Aarthi Balachander Date: Tue, 14 May 2019 17:25:20 -0700 Subject: [PATCH] Move hardcoded values from autofill_save layout file to dimensions. Bug: 131176731 Test: Ran tests Change-Id: Ibfafd26a9fddc6f50ac04e3630fbd40210154eff --- core/res/res/layout/autofill_save.xml | 23 +++++++++++------------ core/res/res/values/dimens.xml | 10 ++++++++++ 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/core/res/res/layout/autofill_save.xml b/core/res/res/layout/autofill_save.xml index d903524263113..d4c3565ed0a6c 100644 --- a/core/res/res/layout/autofill_save.xml +++ b/core/res/res/layout/autofill_save.xml @@ -26,17 +26,17 @@ android:id="@+id/autofill_save" android:layout_width="fill_parent" android:layout_height="wrap_content" - android:layout_marginTop="32dp" - android:paddingTop="16dp" - android:elevation="32dp" + android:layout_marginTop="@dimen/autofill_save_outer_top_margin" + android:paddingTop="@dimen/autofill_save_outer_top_padding" + android:elevation="@dimen/autofill_elevation" android:background="?android:attr/colorBackground" android:orientation="vertical"> + android:layout_width="@dimen/autofill_save_icon_size" + android:layout_height="@dimen/autofill_save_icon_size"/> @@ -67,7 +66,7 @@ android:id="@+id/autofill_save_custom_subtitle" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginTop="4dp" + android:layout_marginTop="@dimen/autofill_save_scroll_view_top_margin" android:visibility="gone"/> @@ -76,7 +75,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="end" - android:padding="16dp" + android:padding="@dimen/autofill_save_button_bar_padding" android:clipToPadding="false" android:layout_weight="1" android:orientation="horizontal"> diff --git a/core/res/res/values/dimens.xml b/core/res/res/values/dimens.xml index 167e6727df3dd..e3af4709b4002 100644 --- a/core/res/res/values/dimens.xml +++ b/core/res/res/values/dimens.xml @@ -668,6 +668,16 @@ 90% 90% + + 32dp + 16dp + 32dp + 16dp + 24dp + 8dp + 4dp + 16dp + 20%