diff options
| author | 2024-07-16 20:54:27 +0000 | |
|---|---|---|
| committer | 2024-07-16 20:54:27 +0000 | |
| commit | 2cb43006a192bb7d13ff387e253f3a04b092f970 (patch) | |
| tree | 17f3c4e02791afeaa90f8c0a24f83d65ca3ea751 | |
| parent | 367596a2c49199184889ce58e190b3127c69da05 (diff) | |
| parent | c99947d7bb77228ecc25b5b9cca63ae0734c81fe (diff) | |
Merge "Fix default large clock too high in portrait mode" into main
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/ClockSection.kt | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/ClockSection.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/ClockSection.kt index 91e48b56b4f5..c8fe55d2a7c4 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/ClockSection.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/ClockSection.kt @@ -25,7 +25,6 @@ import androidx.constraintlayout.widget.ConstraintSet import androidx.constraintlayout.widget.ConstraintSet.BOTTOM import androidx.constraintlayout.widget.ConstraintSet.END import androidx.constraintlayout.widget.ConstraintSet.GONE -import androidx.constraintlayout.widget.ConstraintSet.MATCH_CONSTRAINT import androidx.constraintlayout.widget.ConstraintSet.PARENT_ID import androidx.constraintlayout.widget.ConstraintSet.START import androidx.constraintlayout.widget.ConstraintSet.TOP @@ -184,7 +183,11 @@ constructor( getDimen(ENHANCED_SMARTSPACE_HEIGHT) connect(R.id.lockscreen_clock_view_large, TOP, PARENT_ID, TOP, largeClockTopMargin) constrainWidth(R.id.lockscreen_clock_view_large, WRAP_CONTENT) - constrainHeight(R.id.lockscreen_clock_view_large, MATCH_CONSTRAINT) + + // The following two lines make lockscreen_clock_view_large is constrained to available + // height when it goes beyond constraints; otherwise, it use WRAP_CONTENT + constrainHeight(R.id.lockscreen_clock_view_large, WRAP_CONTENT) + constrainMaxHeight(R.id.lockscreen_clock_view_large, 0) constrainWidth(R.id.lockscreen_clock_view, WRAP_CONTENT) constrainHeight( R.id.lockscreen_clock_view, |