RecyclerView Grid - define number of items per row in

我的梦境 提交于 2019-12-06 00:05:35

There is a constructor of GridLayoutManager, that takes four parameters.

new GridLayoutManager(this, 3, GridLayoutManager.VERTICAL, true)

the second one is the spanCount, the number of columns or rows in the grid, while the forth is called reverseLayout and when set to true, the cells are laid out from the end to the start .

Span size is probably what you are looking for http://blog.sqisland.com/2014/12/recyclerview-grid-with-header.html

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!