summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Lucas Silva <lusilva@google.com> 2025-02-10 10:07:44 -0500
committer Lucas Silva <lusilva@google.com> 2025-02-10 10:09:58 -0500
commit6300632af27ecea28ab9c6249800fb8127cb4040 (patch)
tree9ab2b50f7866274ca53865dec8acfeef26aa4300
parentb1d4e2ef49da6ae500a677570e7e6cd8db91ffaa (diff)
Increase breakpoint for 3 columns on glanceable hub
This ensures we only use 2 columns on foldable form factors. Fixes: 394489402 Test: flashed and verified locally Flag: EXEMPT bugfix Change-Id: I1a94ed9104e2d0bc551c555b6af2a41a42364af4
-rw-r--r--packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/ResponsiveLazyHorizontalGrid.kt4
1 files changed, 1 insertions, 3 deletions
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/ResponsiveLazyHorizontalGrid.kt b/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/ResponsiveLazyHorizontalGrid.kt
index 62aa31b49870..73a24257580c 100644
--- a/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/ResponsiveLazyHorizontalGrid.kt
+++ b/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/ResponsiveLazyHorizontalGrid.kt
@@ -50,7 +50,6 @@ import androidx.compose.ui.unit.times
import androidx.window.layout.WindowMetricsCalculator
import com.android.systemui.communal.util.WindowSizeUtils.COMPACT_HEIGHT
import com.android.systemui.communal.util.WindowSizeUtils.COMPACT_WIDTH
-import com.android.systemui.communal.util.WindowSizeUtils.MEDIUM_WIDTH
/**
* Renders a responsive [LazyHorizontalGrid] with dynamic columns and rows. Each cell will maintain
@@ -267,9 +266,8 @@ fun calculateWindowSize(): DpSize {
}
private fun calculateNumCellsWidth(width: Dp) =
- // See https://developer.android.com/develop/ui/views/layout/use-window-size-classes
when {
- width >= MEDIUM_WIDTH -> 3
+ width >= 900.dp -> 3
width >= COMPACT_WIDTH -> 2
else -> 1
}