Android Gridlayout Example Programmatically

android.widget.GridLayout is a layout manager used to arrange child views in grid. You can specify how much columns and rows the grid have use it’s rowCount or columnCount property. You can change gridlayout size by specify it’s layout_margin property. You can even use child view’s layout_rowSpan or layout_columnSpan property to merge nearby rows or columns.