Android Layout containers have no boundaries. Nonetheless:
You can set the background of each type of cell to the Drawable xml resource, which describes a transparent rectangle with borders.
Give the background color to the parent view of the GridView and set the color of each GridView element to a different color.
Both can also be applied as a style.
source share