小编Sos*_*kin的帖子

垂直滚动列内的 LazyColumn

我有一个,我想在内部Column(modifier = Modifier.verticalScroll(mainScrollState))使用而不明确指定高度。LazyColumnColumnLazyColumn

现在它给了我 java.lang.IllegalStateException: Vertically scrollable component was measured with an infinity maximum height constraints, which is disallowed.

我尝试使用NestedScrollConnection但它没有给我正确的解决方案。有什么解决方法吗?

我的整个可组合项如下所示:

Scaffold() {
    Column() {
       Column() { 
          LazyColumn { ... }
       }
       Column() { ... }
    }
}
Run Code Online (Sandbox Code Playgroud)

android android-jetpack-compose

5
推荐指数
1
解决办法
4770
查看次数

标签 统计

android ×1

android-jetpack-compose ×1