INNER CODE UNIT · Kotlin
GridTrackSizes
IacobIonut01/ReFra · commonMain/androidx/compose/foundation/layout/Grid.kt:906
private class GridTrackSizes(
val columnWidths: IntArray,
val rowHeights: IntArray,
val totalWidth: Int,
val totalHeight: Int,
val columnGapPx: Int,
val rowGapPx: Int,
)
/**
* Executes the "Sparse Packing" auto-placement algorithm to resolve every item's position.
*
* This function is the "Engine" of the auto-placement logic. It transforms a list of raw
* measurables (with potentially unspecified `row`/`column` values) into a concrete plan where every
* item has a specific (row, column) coordinate.
*
* **Algorithm Overview:**
* 1. **Explicit Placement:** Items with both `row` and `column` manually specified are placed