Android Compose-将传统视图与ComposeView结合使用

Android Compose-将传统视图与ComposeView结合使用,android,android-collapsingtoolbarlayout,android-jetpack-compose,Android,Android Collapsingtoolbarlayout,Android Jetpack Compose,我使用现有片段组合。我的xml结构 <CoordinatorLayout> <AppBarLayout> <CollapsingToolbarLayout> <ImageView /> <MaterialToolbar /> </CollapsingToolbarLayout> </AppBarLayout>

我使用现有片段组合。我的xml结构

<CoordinatorLayout>
    <AppBarLayout>
        <CollapsingToolbarLayout>
            <ImageView />
            <MaterialToolbar />
        </CollapsingToolbarLayout>
    </AppBarLayout>

    <androidx.core.widget.NestedScrollView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:layout_behavior="@string/appbar_scrolling_view_behavior">

        <androidx.compose.ui.platform.ComposeView
            android:id="@+id/composeContent"
            android:layout_width="match_parent"
            android:layout_height="match_parent" />
    </androidx.core.widget.NestedScrollView>
</CoordinatorLayout>
我认为这个错误的原因是Lazycolm(可滚动)放在了其他可滚动(NestedScrollView)中。但是如果我删除NestedScrollView,它看起来像

<androidx.compose.ui.platform.ComposeView
    android:id="@+id/composeContent"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    app:layout_behavior="@string/appbar_scrolling_view_behavior" />

当我在LazyColumn中滚动列表时,CollasingToolbarLayout并没有滚动。这是下一个bug

如何修复它

请帮帮我。谢谢

<androidx.compose.ui.platform.ComposeView
    android:id="@+id/composeContent"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    app:layout_behavior="@string/appbar_scrolling_view_behavior" />