RecyclerView with StaggeredLayoutManager on multiple (difference) row and column span

428 Views Asked by At

i have a RecyclerView and StaggeredLayoutManager that i want to put some CardView with different row and column span but base on defined fixed size
like as it :

enter image description here


if you saw CardView of 0 is 4X (2 row x 2 column ) of 1
and smaller CardView size is base of other size

all card dimensions are :
Row X Column
1 x 1
1 x 2
2 x 1
2 x 2

but when i defined the StaggeredLayoutManager needs to pass span size , in this case span size is 5

but main problem is when i pass span size my RecyclerView is divided by it and can not to handle more than 1 span and if that was bigger i see it is cut by half in width but height is ok

how can i to configure my RecyclerView or StaggeredLayoutManager to fix this problem and could to handle 2D span size in Row and Column both?

0

There are 0 best solutions below