GridView设置网格线

来源:互联网 发布:淘宝自动核对地址功能 编辑:程序博客网 时间:2024/04/29 15:49

Gridview没有直接设置网线的属性

要实现gridview的网格线:

1.将gridview的背景颜色设置为需要的网格线的颜色

2.设置gridview的  android:verticalSpacing="1dp",两行之间的边距为1dp   android:horizontalSpacing="1dp",两列之间的边距为1dp。

3.设置gridview的item的android:layout_width = "match_parent" android:layout_height = "match_parent"

0 0