如何在 Jetpack Compose 中将触摸事件分派给父可组合项

eny*_*iaa 14 android android-jetpack-compose

我似乎找不到有关 Compose 中触摸处理的太多信息。

在我正在查看的具体情况下,我有一个这样的列表:

@Composable
fun MyListComposable(items: List<Item>) {
    LazyColumn(
        contentPadding = paddingValues(listHorizontalMargin, listVerticalMargin),
    ) {
        // Init items emitted for brevity
    }

}
Run Code Online (Sandbox Code Playgroud)

该列表包含在使用swipeable修饰符的父级中,如下所示。

Card(
    modifier = Modifier.swipeable(
        state = state,
        anchors = mapOf(
            0.dp.value to DrawerState.OFFSCREEN,
            50.dp.value to DrawerState.PEEKING,
            maxHeight.value to DrawerState.EXPANDED,
        ),
        reverseDirection = true,
        thresholds = { _, _ -> FractionalThreshold(0f) },
        orientation = Orientation.Vertical
    ) {
         MyListComposable(items)
}
Run Code Online (Sandbox Code Playgroud)

我的问题是列表吞噬了所有触摸,因此永远不会调用可滑动项。所以我的问题是,有没有办法阻止懒惰的列吞噬触摸?