Raed Ghazal
04/29/2025, 5:26 PMRaed Ghazal
04/29/2025, 5:27 PMsetContent {
val parentScrollState = rememberScrollState()
Scaffold(
modifier = Modifier
.fillMaxSize()
.background(Color.White),
) {
Column(
modifier = Modifier
.fillMaxSize()
.padding(it)
) {
Row(
modifier = Modifier
.fillMaxWidth()
.height(60.dp)
.background(color = Color.White)
.padding(horizontal = 16.dp, vertical = 12.dp),
horizontalArrangement = Arrangement.SpaceBetween,
verticalAlignment = Alignment.CenterVertically
) {
Text(
text = "Testing",
style = TextStyle(
fontSize = 20.sp
),
color = Color.Green,
maxLines = 1,
overflow = TextOverflow.Ellipsis
)
}
Column(
modifier = Modifier
.fillMaxSize()
.verticalScroll(parentScrollState)
.padding(16.dp)
) {
repeat(20) {
TextField(it.toString(), {})
Spacer(modifier = Modifier.height(16.dp))
}
}
}
}
}Raed Ghazal
04/29/2025, 5:28 PMparentScrollState.scrollTo(textFieldOffset.y) but thats not optimal, it should work out of the boxHalil Ozercan
04/29/2025, 6:01 PMADJUST_PAN or ADJUST_RESIZE , or something else? Are you handling window insets yourself? Do you call enableEdgeToEdge in your Activity?Halil Ozercan
04/29/2025, 6:02 PMRaed Ghazal
04/29/2025, 6:14 PMRaed Ghazal
04/29/2025, 6:14 PMRaed Ghazal
04/29/2025, 6:15 PMHalil Ozercan
04/29/2025, 6:16 PMADJUST_PAN . Can you try using ADJUST_RESIZE ?Raed Ghazal
04/29/2025, 6:17 PMHalil Ozercan
04/29/2025, 6:20 PMHalil Ozercan
04/29/2025, 6:21 PMRaed Ghazal
04/29/2025, 6:41 PMRaed Ghazal
04/29/2025, 6:41 PMimePadding almost everywhere my self, so I set it to adjustNothing and its fixed