From 28243367dfadd7933f4d1285587738b2bac1bd6f Mon Sep 17 00:00:00 2001 From: menghanli Date: Tue, 14 Apr 2020 14:57:11 +0800 Subject: [PATCH] Fine tune the maganication area edit dialog Root cause: The asset is not rectangle, it is high > width asset. Called the centerCrop cause the both dimensions (width and height) of the image will be equal to or larger than the corresponding dimension of the view (minus padding). Solution: Change to fitCenter. Bug: 146473544 Test: local test Change-Id: I17de6a09f21e1454afcdd0297b81868c1b819de1 --- .../accessibility_edit_magnification_mode.xml | 13 ++++++++++--- .../accessibility_edit_shortcut_component.xml | 2 +- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/res/layout/accessibility_edit_magnification_mode.xml b/res/layout/accessibility_edit_magnification_mode.xml index bdc355d2551..e4f31328fae 100644 --- a/res/layout/accessibility_edit_magnification_mode.xml +++ b/res/layout/accessibility_edit_magnification_mode.xml @@ -28,12 +28,19 @@ android:padding="24dp"> + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/accessibility_magnification_area_settings_message" + android:textAppearance="?android:attr/textAppearanceListItemSecondary" + android:textColor="?android:attr/textColorSecondary" + android:layout_marginBottom="24dp"/> + layout="@layout/accessibility_edit_shortcut_component" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="32dp" /> + android:scaleType="fitCenter" />