I'm trying to achieve in Android a list of views that will look like this:
Couple of specific behaviours which made this a problem for me:
- The list of views (in red), can be dynamic, and can vary in size
- The views flow should be rows then columns, as follows:
I manage to achieve the first requirement with Recycleview and the layout manager StaggeredGridLayoutManager (setted the cell height on the adapter onCreateViewHolder).
StaggeredGridLayoutManager lManager = new StaggeredGridLayoutManager(2, StaggeredGridLayoutManager.HORIZONTAL);
But the way the layout populate itself is in the opposite direction then what I need (it populate columns then rows, as follows)
Or how it actually looks on the android app:
Is it possible to set layout manager to lay items as I need? I tried other solutions like putting all the available views in a tablelayout, then toggle visibility, but it has it's limitations as well, and I prefer the recycleview solution.