From 444ddc6c906bee50fa931f4d83ea649571971793 Mon Sep 17 00:00:00 2001 From: Stanley Wang Date: Thu, 24 Jun 2021 15:39:48 +0800 Subject: [PATCH] Refine the IllustrationPreference. - If we set a fixed height for the illustration and automatically scale the width of the illustration, the size of the background layer will be different from the size of the illustration. To fix this problem, we must make the background layer the same size as the illustration and automatically scale. - Update the size of background to 412x300. - Update the layout of frame's child views to wrap_content. - Update the padding of frame to 16dp. Bug: 190810977 Test: robotest and see the UI Change-Id: I0422f91c24860154fea7c766d5670c314d62bebb --- .../res/drawable/protection_background.xml | 2 ++ .../res/layout/illustration_preference.xml | 22 ++++++++++--------- .../res/values/dimens.xml | 2 +- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/packages/SettingsLib/IllustrationPreference/res/drawable/protection_background.xml b/packages/SettingsLib/IllustrationPreference/res/drawable/protection_background.xml index 0734aca2ab90c..a027f287a0aad 100644 --- a/packages/SettingsLib/IllustrationPreference/res/drawable/protection_background.xml +++ b/packages/SettingsLib/IllustrationPreference/res/drawable/protection_background.xml @@ -20,6 +20,8 @@ + diff --git a/packages/SettingsLib/IllustrationPreference/res/layout/illustration_preference.xml b/packages/SettingsLib/IllustrationPreference/res/layout/illustration_preference.xml index efcd41c2778bc..54145d60fb32b 100644 --- a/packages/SettingsLib/IllustrationPreference/res/layout/illustration_preference.xml +++ b/packages/SettingsLib/IllustrationPreference/res/layout/illustration_preference.xml @@ -27,27 +27,29 @@ - + diff --git a/packages/SettingsLib/IllustrationPreference/res/values/dimens.xml b/packages/SettingsLib/IllustrationPreference/res/values/dimens.xml index 3f38769973db4..fc273dc7403b0 100644 --- a/packages/SettingsLib/IllustrationPreference/res/values/dimens.xml +++ b/packages/SettingsLib/IllustrationPreference/res/values/dimens.xml @@ -17,7 +17,7 @@ - 12dp + 16dp 412dp 300dp