【问题标题】:Staggered horizontal Recyclerview Android, help needed交错水平Recyclerview Android,需要帮助
【发布时间】:2020-11-11 21:42:39
【问题描述】:

我想要实现的是创建一个水平滚动的 RecyclerView,并且项目应该以不同的大小出现,类似于从 0 位置开始的绘图等等。到目前为止我尝试过的是:

  1. 使用适配器 onBindViewHolder 上的项目位置,但这不是解决方案,也不能解决我的问题。
  2. 将 StaggeredGridLayoutManager 实现为布局管理器 StaggeredGridLayoutManager staggeredGridLayoutManager = new StaggeredGridLayoutManager(3, StaggeredGridLayoutManager.HORIZONTAL);,但 spanCount 阻止了我。
  3. GridLayoutManager 垂直滚动,而不是水平滚动

是否有任何关于如何设计特定 RecyclerView 布局管理器的库或指南?任何帮助将不胜感激,谢谢!

【问题讨论】:

    标签: android android-recyclerview customization android-gridlayout staggeredgridlayoutmanager


    【解决方案1】:

    Google lib 可以帮你实现Staggered horizontal Recyclerview

    【讨论】:

    • 你有经验吗,它是自动计算行数跨度还是你在开始时定义它?谢谢!
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-04-06
    • 1970-01-01
    • 1970-01-01
    • 2011-01-26
    • 2011-09-02
    • 1970-01-01
    相关资源
    最近更新 更多