【问题标题】:Complex layout in Jetpack Compose with nested scrolling composablesJetpack Compose 中的复杂布局,带有嵌套的滚动组合
【发布时间】:2021-12-30 07:40:19
【问题描述】:

这个想法是在jetpack compose中创建一个类似于这个伪代码的布局:

<SwipeRefreshLayout>
 <CoordinatorLayout>
  <NavigationDrawer>
  <AppBarLayout>
   <CollapsingToolbarLayout>
    <ConstraintLayout/> (contains some text view)
   </CollapsingToolbarLayout>
  <AppBarLayout>
  <NestedScrollView>
   <LinearLayout>
    <ConstraintLayout> (contains some text views and buttons)
    <HorizontalRecyclerView/>
    <TabLayout/> (which works like sticky header)
    <ViewPager/>
   </LinearLayout>
  </NestedScrollView>
 </CoordinatorLayout>
</SwipeRefreshLayout>

我面临的问题是 LazyColumn 不能进入其他滚动组件。因此,如果您能指导我了解一些很棒的概念/链接/示例。

【问题讨论】:

    标签: android-jetpack-compose lazycolumn


    【解决方案1】:

    我认为你可以使用

    FlowColumn {
    //
    }
    

    指南 https://google.github.io/accompanist/flowlayout/

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-10-26
      • 1970-01-01
      • 2022-07-18
      相关资源
      最近更新 更多