File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -53,23 +53,18 @@ Usage
53
53
54
54
1 . Add the ` StaggeredGridView ` to the layout you want to show.
55
55
``` xml
56
- <FrameLayout xmlns : android =" http://schemas.android.com/apk/res/android"
57
- xmlns : app =" http://schemas.android.com/apk/res-auto"
58
- android : layout_width =" match_parent"
59
- android : layout_height =" match_parent" >
60
-
61
56
<com .etsy.android.grid.StaggeredGridView
57
+ xmlns : android =" http://schemas.android.com/apk/res/android"
58
+ xmlns : app =" http://schemas.android.com/apk/res-auto"
62
59
android : id =" @+id/grid_view"
63
60
android : layout_width =" match_parent"
64
61
android : layout_height =" match_parent"
65
62
app : item_margin =" 8dp"
66
- app : column_count_portrait =" 2"
67
- app : column_count_landscape =" 3" />
68
-
69
- </FrameLayout >
63
+ app : column_count =" @integer/column_count" />
70
64
```
71
65
2. Configure attributes.
72
66
* `item_margin` - The margin around each grid item (default 0dp).
67
+ * `column_count` - The number of columns displayed. Will override column_count_portrait and column_count_landscape if present (default 0)
73
68
* `column_count_portrait` - The number of columns displayed when the grid is in portrait (default 2).
74
69
* `column_count_landscape` - The number of columns displayed when the grid is in landscape (default 3).
75
70
* `grid_paddingLeft` - Padding to the left of the grid. Does not apply to headers and footers (default 0).
You can’t perform that action at this time.
0 commit comments