Ruthwik Warrier Ruthwik Warrier - 11 months ago 130
Java Question

Android - Staggered Grid View

I followed this post to create Staggered Layout.

No good example about RecyclerView and StaggeredGridLayoutManager in Android Docs

When I am using images with different size, it works fine. But when I am using images with same size, the rows are even. It appears as ordinary grid view.

Is there any way to solve this..?

Answer Source

This is how it's supposed to work:

The StaggeredGridLayoutManager will show a staggered grid if and only if images have different sizes: it will try to fill the gaps using a strategy that you can define in your code. There is also a talk by Dave Smith explaining this.

If the images are all of the same size, the grid will look like a regular one.