英文:
Vertical and Horizontal Recyclerview in the same layout
问题
我看到很多应用程序使用这种布局,但我从未理解如何创建类似这样的东西:
我应该怎么做?
- 在同一个布局中创建3个RecyclerView
- 使用一个主要的RecyclerView,在适配器中“inflate”水平和垂直的布局
- 还有其他什么方法吗?
我不知道是否可以在同一个适配器中“inflate”不同的RecyclerView(水平和垂直)。
英文:
I see a lot of apps using this layout but i never understand how to create something like this:
What i have to do?
- Create 3 recyclerview inside the same layout
- Use a main recyclerview and in adapter "inflate" the Horizontal and Vertical
- Something else?
I don't know if it's possible inflate different recyclerview(horizontal and vertical) in the same Adapter.
答案1
得分: 0
这被称为嵌套 RecyclerView。基本上,您在其中填充子 RecyclerView 的垂直 RecyclerView,并且在子 RecyclerView 内填充最终的 CardView。
英文:
That's called a nested recycler view. you basically have a vertical recycler view in which you inflate your child recycler views and inside the child recycler views you inflate your final CardViews.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论