Set space between columns and rows for GridView

At times you may need to set Space between columns and rows for in GridView.

Set following attributes of GridView

To set space between rows

android:verticalSpacing=”2dp”

To set space between columns

android:horizontalSpacing=”2dp”

Sample screeshot..
set space

Cheers..

You may be also interested in

2 Comments

  1. M.K | | Reply

    Could you please share with us sample code of the mentioned app.

    Thanks in advance.

Leave a Reply

Your email address will not be published. Required fields are marked *