出于某种原因LazyColumn
,不要通过鼠标单击和移动手势滚动。到目前为止,它仅适用于鼠标滚轮。对于LazyRow
s,也无法使用鼠标滚轮滚动。似乎惰性行对于 Compose for desktop 没用。
是否可以在 和 上启用单击和移动LazyRow
手势LazyColum
。如果没有,至少可以启用LazyRow
鼠标滚轮滚动吗?
我使用这个最小的可重现示例来测试滚动
@Composable
@Preview
fun App() {
var text by remember { mutableStateOf("Hello, World!") }
MaterialTheme {
LazyRow(modifier = Modifier.fillMaxSize()) {
repeat(100) {
item {
Text("Test Test Test Test $it ")
}
}
}
}
}
fun main() = application {
Window(onCloseRequest = ::exitApplication) {
App()
}
}