INNER CODE UNIT · Kotlin

finalRow

IacobIonut01/ReFra · commonMain/androidx/compose/foundation/layout/Grid.kt:1005

        var finalRow = -1
        var finalCol = -1

        // 1. Fully Explicit (Row & Column fixed)
        // We simply place it there. Overlaps are allowed for explicit placement.
        if (requestedRow != -1 && requestedCol != -1) {
            finalRow = requestedRow
            finalCol = requestedCol
        }
        // 2. Fixed Row (Search for Column)
        else if (requestedRow != -1) {
            // Search for the first available column in the specified row.
            finalRow = requestedRow
            var candidateCol = 0

            // If flowing by Row, and we are on the cursor's row, start searching from cursor
            if (flow == GridFlow.Row && requestedRow == autoPlacementCursorRow) {
                candidateCol = autoPlacementCursorCol

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…