I have to show images in an asymmetric grid dynamically - setting both rowSpan(height) and colSpan(width)(Supporting Android 10+). I have tried the following approaches
Approaches tried
RecyclerView with GridLayoutManager With this, we can change only the width of an item(colSpan)(when the GridLayoutManager orientation is VERTICAL). We cannot change height(rowSpan)
RecyclerView with StaggeredGridLayoutManager It supports horizontal & vertical layout as well as an ability to layout children in reverse. But as with the GridLayoutManager, we can only set either the rowSpan or the colSpan but not both(Depending on it's orientation
TwoWayView This seemed like an ideal solution. But the library has a problem with latest versions of Android support library https://github.com/lucasr/twoway-view/issues/266. And we are using Android support library 23.3.2 in our project.
AsymmetricGridView The author of the library has mentioned a caveat "Currently only has good support for items with rowSpan = 2 and columnSpan = 2". I am looking for a library that supports other row and column spans
GridLayout This is only for Android 14+. I am looking at a solution which supports Android 10+
I have looked at the following Stack Overflow questions
No good example about RecyclerView and StaggeredGridLayoutManager in Android Docs
How to create AsymmetricGridView with different image sizes in row
Any help is greatly appreciated.