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
This commit is contained in:
Jamie Garside
2022-07-22 15:12:54 +01:00
parent df74b6ddbc
commit c193051908

View File

@@ -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">
<com.android.keyguard.PasswordTextView
android:id="@+id/pinEntry"