From c193051908561b95033132c50cea7df5bf954b30 Mon Sep 17 00:00:00 2001 From: Jamie Garside Date: Fri, 22 Jul 2022 15:12:54 +0100 Subject: [PATCH] Ensure PIN text view stays on screen regardless of font size. This was previously only anchored to the top of the "1" button, so ConstraintLayout didn't care if it fell off-screen. This also adds a constraint to pin it to the top of the parent container (with a bias to drop it to the bottom of the available space); this ensures that it remains on-screen. With font/display density set to max, the buttons now get a little smaller, but the text view is still on screen. Test: Manually verified. Bug: 236950644 Change-Id: Iac0209e297c6c80af616199637871a427184a1ad --- packages/SystemUI/res-keyguard/layout/keyguard_pin_view.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/res-keyguard/layout/keyguard_pin_view.xml b/packages/SystemUI/res-keyguard/layout/keyguard_pin_view.xml index 7ce6f0e56b8f8..712f657a20aeb 100644 --- a/packages/SystemUI/res-keyguard/layout/keyguard_pin_view.xml +++ b/packages/SystemUI/res-keyguard/layout/keyguard_pin_view.xml @@ -48,10 +48,11 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingBottom="@dimen/num_pad_entry_row_margin_bottom" + androidprv:layout_constraintTop_toTopOf="parent" androidprv:layout_constraintEnd_toEndOf="parent" androidprv:layout_constraintStart_toStartOf="parent" androidprv:layout_constraintBottom_toTopOf="@id/key1" - androidprv:layout_constraintVertical_bias="0.0"> + androidprv:layout_constraintVertical_bias="1.0">