I need to implement several views in the same recycler view, with different width and height size, take a look at this image
Sometimes I will need to paint a item that takes two colums, as the first item in the image, I already can do this with this:
layoutManager.spanSizeLookup = object : SpanSizeLookup() {
override fun getSpanSize(position: Int): Int {
return if (twoColumns.contains(position)) 2 else 1
}
}
But I also have to do something like the item 6, that takes two rows and one column and currently I cannot do that, I tried with this library, and also with FlexboxLayoutManager, and I can't achieve that.
Is there another layout manager that fit better to my approach, or any library?
StaggeredGridLayoutManager, but you will still need to calculate and set the height manually for items to take its place as in the image.