Android - Difference between Gridlayout and Staggered Gridlayout

IBRAR AHMAD picture IBRAR AHMAD · Dec 11, 2015 · Viewed 37.1k times · Source

I am working in android material design api & want to display some data in grid format. I tried both GridLayout and StaggeredGridlayout and both look same. For general information, i want to ask what is the difference between Gridlayout and StaggeredGridlayout?

Thank you.

Answer

Vipul Asri picture Vipul Asri · Dec 11, 2015

Grid View : It is is a ViewGroup that displays items in a two-dimensional, scrollable grid. In this each Grid is of same size (Height and width). Grid View shows symmetric items in view.

Grid View

Staggered Grid View : It is basically an extension to Grid View but in this each Grid is of varying size(Height and width). Staggered Grid View shows asymmetric items in view.

staggered grid view

Tutorial to implement Staggered Grid View :

  1. Staggered Grid View
  2. Pinterest Masonry layout Staggered Grid View