Skip to content
This repository was archived by the owner on Dec 27, 2024. It is now read-only.

Commit ca73430

Browse files
committed
change the default to 0 not 1 and fix comment
1 parent 3cfcad0 commit ca73430

File tree

1 file changed

+3
-3
lines changed
  • constraintlayout/constraintlayout/src/main/java/androidx/constraintlayout/helper/widget

1 file changed

+3
-3
lines changed

constraintlayout/constraintlayout/src/main/java/androidx/constraintlayout/helper/widget/Grid.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public class Grid extends VirtualLayout {
106106
private int mColumns;
107107

108108
/**
109-
* number of columns of the grid
109+
* number of columns set by the XML or API
110110
*/
111111
private int mColumnsSet;
112112

@@ -202,9 +202,9 @@ protected void init(AttributeSet attrs) {
202202
for (int i = 0; i < n; i++) {
203203
int attr = a.getIndex(i);
204204
if (attr == R.styleable.Grid_grid_rows) {
205-
mRowsSet = a.getInteger(attr, 1);
205+
mRowsSet = a.getInteger(attr, 0);
206206
} else if (attr == R.styleable.Grid_grid_columns) {
207-
mColumnsSet = a.getInteger(attr, 1);
207+
mColumnsSet = a.getInteger(attr, 0);
208208
} else if (attr == R.styleable.Grid_grid_spans) {
209209
mStrSpans = a.getString(attr);
210210
} else if (attr == R.styleable.Grid_grid_skips) {

0 commit comments

Comments
 (0)