0

Take GridLayoutManager as an example. The span sizes of every item are all 1 and the grid has 8 columns. In this case, a fully filled row should have 8 items within.

However, for some rows, I want to leave some trailing blank space and the subsequent item should be placed in the next row. Since all spans are having a size of 1, it is not appropriate to stretch the item to occupy the whole row to make the next item be placed on the new row.

I have been looking for answers in many places but still haven't found a workaround. Is it possible for GridLayout to do so? Or is it I have to use a custom layout extending LayoutManager?

Thanks for any suggestions.

  • Does this answer your question? [RecyclerView with StaggeredGridLayoutManager : variable number of columns and vertically scrollable](https://stackoverflow.com/questions/59998188/recyclerview-with-staggeredgridlayoutmanager-variable-number-of-columns-and-ve) – Andrew Jul 29 '23 at 10:12

0 Answers0