From df8edda1a2b262def4ce2b58c352255ce763b0b3 Mon Sep 17 00:00:00 2001 From: Nick Chameyev Date: Fri, 4 Jun 2021 16:26:20 +0000 Subject: [PATCH] Update wallet button size for large screens, reduce keyguard bottom text margin The distortion of the wallet button occurs because keyguard affordance width/height are overridden with different values on larger screens (sw600dp) and width is greater than height. Wallet button should have the same size on all screen sizes, I created a separate pair of resources for this button. Also updated keyguard bottom text margin, it should be lowered so it is horizontally aligned with the wallet button and the margin should be the same across all screen sizes. Test: https://screenshot.googleplex.com/3BFdcFMWRLLv482.png (small screens) Test: https://screenshot.googleplex.com/9d7oZrvAiwY7Vi2.png (large screens) Bug: 189116030 Change-Id: Iac822e657e44d9664c616abe67096e48d594d7c0 --- packages/SystemUI/res/layout/keyguard_bottom_area.xml | 4 ++-- packages/SystemUI/res/values-sw600dp/dimens.xml | 2 -- packages/SystemUI/res/values/dimens.xml | 6 +++++- .../systemui/statusbar/phone/KeyguardBottomAreaView.java | 4 ++-- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/packages/SystemUI/res/layout/keyguard_bottom_area.xml b/packages/SystemUI/res/layout/keyguard_bottom_area.xml index 80b7d1f8970ff..e40138e1f49ce 100644 --- a/packages/SystemUI/res/layout/keyguard_bottom_area.xml +++ b/packages/SystemUI/res/layout/keyguard_bottom_area.xml @@ -80,8 +80,8 @@ 80dp - 90dp - 2dp diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml index 05f2f6727a73f..11cd5a35f002c 100644 --- a/packages/SystemUI/res/values/dimens.xml +++ b/packages/SystemUI/res/values/dimens.xml @@ -892,6 +892,10 @@ 48dp 48dp + + 48dp + 48dp + 32dp 32dp 12sp diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java index 4d8e7de376064..8e3aed43d1af5 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java @@ -368,8 +368,8 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL updateLeftAffordanceIcon(); lp = mWalletButton.getLayoutParams(); - lp.width = getResources().getDimensionPixelSize(R.dimen.keyguard_affordance_width); - lp.height = getResources().getDimensionPixelSize(R.dimen.keyguard_affordance_height); + lp.width = getResources().getDimensionPixelSize(R.dimen.keyguard_affordance_wallet_width); + lp.height = getResources().getDimensionPixelSize(R.dimen.keyguard_affordance_wallet_width); mWalletButton.setLayoutParams(lp); mIndicationPadding = getResources().getDimensionPixelSize(