Vilgot Fredenberg
11/28/2024, 10:58 AMimePadding()
call with:
.composed {
val ime = WindowInsets.ime
Log.i("COMPOSE", "ime: $ime")
Log.i("COMPOSE", "scroll: ${scroll.value}") // scroll: ScrollState
Modifier.windowInsetsPadding(ime)
}
(ime
starts updating ~50ms before and ~100ms after scroll
)Vilgot Fredenberg
11/28/2024, 10:59 AMVilgot Fredenberg
11/28/2024, 11:17 AMHalil Ozercan
11/28/2024, 1:23 PMvalue, onValueChange
or TextFieldState
? Also what is compose foundation version in your project?Vilgot Fredenberg
11/28/2024, 1:36 PMvalue, onValueChange
overload with compose BOM 2024.11.00 (compose.foundation 1.7.5).
Also here's a quick MRE (both LazyColumn
and Column
cause the issue):
@Composable
fun MRE() {
LazyColumn(
Modifier
.padding(horizontal = 24.dp)
.imePadding(),
verticalArrangement = Arrangement.spacedBy(8.dp)
) {
items(20) {
OutlinedTextField("",
onValueChange = {},
modifier = Modifier.fillMaxWidth(),
label = { Text("Field ${it + 1}") })
}
item {
Spacer(Modifier.navigationBarsPadding())
}
}
}
Vilgot Fredenberg
11/28/2024, 2:00 PMLazyColumn
by setting reverseLayout = true
and placing my items in reverse (and reversing the initial scroll state index).Stylianos Gakis
11/30/2024, 10:00 AMVilgot Fredenberg
12/02/2024, 10:04 AM