Staggered Layout

Staggered layout let's you create automatic alignment to child views. Based on width views can be occupied space horizontally. If space is not available ,then that view goes to next row.

For more information : See this discussion in Stackoverflow.

https://stackoverflow.com/questions/32109652/recycler-view-with-multiple-rows-and-columns-autofit-like-flow-layout-android