I have a RecyclerView with a StaggeredGridLayoutManager. The problem is that before a full span element there is a gap that I need to fill, increasing/decreasing the height of the last two elements. A picture of the problem:
- Just 2 columns are required.
- The elements of the grid can have different heights.
I'm trying to calculate the height of the two columns using each element height, and at the end see which column is longer, and add height to the shortest, but I don't know where is a safe place to set the new height. When I know for sure the height of the view is the one is going to be draw.
I'm stuck for days with this problem, any suggestions are welcome!