android.widget.GridView
Class Overview
A view that shows items in two-dimensional scrolling grid. The items in the grid come from the ListAdapter
associated with this view.
See the Grid View guide.
XML Attributes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Attribute Name | Related Method | Description | |||||||||
android:columnWidth | setColumnWidth(int) | Specifies the fixed width for each column. //给每一列指定确定的宽度 | |||||||||
android:gravity | setGravity(int) | Specifies the gravity within each cell. //给每一格指定重力(比重) | |||||||||
android:horizontalSpacing | setHorizontalSpacing(int) | Defines the default horizontal spacing between columns. //定义在两列之间默认的水平间隔 | |||||||||
android:numColumns | setNumColumns(int) | Defines how many columns to show. //定义要显示的列数 | |||||||||
android:stretchMode | setStretchMode(int) | Defines how columns should stretch to fill the available empty space, if any. //定义了列表应当如何延伸到可用的空的空间,如果有(空间)的话 | |||||||||
android:verticalSpacing | setVerticalSpacing(int) | Defines the default vertical spacing between rows. //定义了在两行之间默认的垂直间隔 |