The step create a masonry layout is similar create grid layout view here
Video how to create masonry layout: