Skip to content

Commit b75d203

Browse files
committed
Add vertical scrolling to the main column in the App component.
1 parent 73c4a04 commit b75d203

File tree

1 file changed

+5
-0
lines changed
  • composeApp/src/commonMain/kotlin/de/rbn/speedcalctrainer

1 file changed

+5
-0
lines changed

composeApp/src/commonMain/kotlin/de/rbn/speedcalctrainer/App.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@ package de.rbn.speedcalctrainer
33
import androidx.compose.animation.*
44
import androidx.compose.animation.core.tween
55
import androidx.compose.foundation.layout.*
6+
import androidx.compose.foundation.rememberScrollState
67
import androidx.compose.foundation.text.KeyboardActions
78
import androidx.compose.foundation.text.KeyboardOptions
9+
import androidx.compose.foundation.verticalScroll
810
import androidx.compose.material.MaterialTheme
911
import androidx.compose.runtime.*
1012
import androidx.compose.ui.Alignment
@@ -58,9 +60,12 @@ fun App(modifier: Modifier = Modifier) {
5860
updateNumbers()
5961
}
6062

63+
val scrollState = rememberScrollState()
64+
6165
Column(
6266
modifier = modifier
6367
.fillMaxSize()
68+
.verticalScroll(scrollState) // Enable vertical scrolling
6469
.padding(16.dp),
6570
verticalArrangement = Arrangement.Top,
6671
horizontalAlignment = Alignment.CenterHorizontally

0 commit comments

Comments
 (0)