【发布时间】:2021-09-09 20:24:04
【问题描述】:
那么我如何滚动屏幕,里面有一个惰性列? 我只是尝试测试它在包含惰性列的父框中设置一个verticalScroll(记住..)和许多其他可组合但我收到了这个错误:
java.lang.IllegalStateException: Nesting scrollable in the same direction layouts like LazyColumn and Column(Modifier.verticalScroll()) is not allowed.
If you want to add a header before the list of items please take a look on LazyColumn component which has a DSL api which allows to first add a header via item() function and then the list of items via items().
所以我想将此屏幕滚动到 2 个框消失并且惰性列保持在顶部的位置。如果有项目,则在滚动时保持在顶部。 (但永远不会消失在屏幕上。就像它在使用它的高度一样)
【问题讨论】:
标签: android android-jetpack-compose