具有自动跨度计数和带包装内容的项目宽度的回收器视图

Recycler view with auto span count and item width with wrap content

我有一个 RecyclerView 和一个 GridLayoutManger。我想根据项目宽度使用动态跨度计数。

I don't want fixed item width.

您可以使用来自 google 的 FlexboxLayoutManager:

https://github.com/google/flexbox-layout