What are some ways to implement this layout

55 Views Asked by At

I have a GridLayout using RecyclerView. I need to have an interface that looks like this -

enter image description here

Some items from the recycler view need to be displayed inside a container with rounded corners. What are some ways to implement this other than having a nested recycler view inside a recycler view section?

1

There are 1 best solutions below

2
On

You can use item decorators to achieve this, You will have to add some logic while drawing the container, for example to achieve the above picture, you will have to divide this container into four parts and draw top left for item 0, then top right for item 1, bottom left for item 2, and bottom right for item 3

If you can afford losing rounded corners then it would be really easy for you