具有包装内容项的RecyclerView [英] RecyclerView with wrap content items
本文介绍了具有包装内容项的RecyclerView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要实现下一个UI元素:
I need to implement next UI element:
- 未知大小的字符串列表(来自服务器调用)
- 任何物品都应为包装内容.
- 如果某项不适合行,那么他将在下一行.
- 所有列表/网格都居中
我想到了将RecyclerView
与StaggeredGridLayoutManager
一起使用
但是我不知道这是否正确,有什么想法吗?
But I don't know if it the right way, any ideas?
推荐答案
我不确定该方法对您有帮助,但不是
I don't sure that method would be helpful for you, but instead of
将RecyclerView与StaggeredGridLayoutManager结合使用
using RecyclerView with StaggeredGridLayoutManager
您可以使用第三方FlowLayout
:
查看此要点以获取完整示例:
https://github.com/davidbeloo/Hashtags
这篇关于具有包装内容项的RecyclerView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文