android.widget.GridView

来源:互联网 发布:手机淘宝如何更换账号 编辑:程序博客网 时间:2024/04/30 03:06

                      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 AttributesAttribute NameRelated MethodDescriptionandroid:columnWidthsetColumnWidth(int)Specifies the fixed width for each column.   //给每一列指定确定的宽度android:gravitysetGravity(int)Specifies the gravity within each cell.   //给每一格指定重力(比重)android:horizontalSpacingsetHorizontalSpacing(int)Defines the default horizontal spacing between columns. //定义在两列之间默认的水平间隔android:numColumnssetNumColumns(int)Defines how many columns to show. //定义要显示的列数android:stretchModesetStretchMode(int)Defines how columns should stretch to fill the available empty space, if any. //定义了列表应当如何延伸到可用的空的空间,如果有(空间)的话android:verticalSpacingsetVerticalSpacing(int)Defines the default vertical spacing between rows. //定义了在两行之间默认的垂直间隔