From 6c135b7b8cfe3b584cdbf9a5043181bb8b683933 Mon Sep 17 00:00:00 2001 From: Fabian Kozynski Date: Thu, 4 Aug 2022 16:56:01 -0400 Subject: [PATCH] Use same height for start and end of date view This prevents a bad measure (possibly due to optimizer in version of ConstraintLayout) happening sometimes right before collapsing QS. Without this patch, right before reaching the end of the collapse into QQS the date would be measured with the layout height for progress 1 (instead of 0). This would cause it to be shorter than it expected to be for the container and therefore not aligned properly (it would badly calculate its top spacing). Bug: 215584502 Test: manual, fling collapse QS Test: atest com.android.systemui.shade Change-Id: I6c9a4425f15408e63adc82d31bad3ae46beebd0f --- packages/SystemUI/res/xml/qqs_header.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/SystemUI/res/xml/qqs_header.xml b/packages/SystemUI/res/xml/qqs_header.xml index ee0c4fb6bab83..a82684d0358b4 100644 --- a/packages/SystemUI/res/xml/qqs_header.xml +++ b/packages/SystemUI/res/xml/qqs_header.xml @@ -43,7 +43,7 @@ android:id="@+id/date"> @@ -76,7 +76,7 @@ app:layout_constraintHeight_min="@dimen/qs_header_non_clickable_element_height" app:layout_constraintStart_toEndOf="@id/statusIcons" app:layout_constraintEnd_toEndOf="@id/end_guide" - app:layout_constraintTop_toTopOf="@id/date" + app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintHorizontal_bias="1" /> @@ -100,8 +100,8 @@ android:layout_height="0dp" app:layout_constraintStart_toEndOf="@id/date" app:layout_constraintEnd_toEndOf="@id/end_guide" - app:layout_constraintTop_toTopOf="@id/date" - app:layout_constraintBottom_toBottomOf="@id/date" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintHorizontal_bias="1" />