Fix when GridLayout is recycled some internal states are not invalidated correctly (#104)

This commit is contained in:
Hristo Hristov
2017-08-09 15:52:52 +03:00
committed by GitHub
parent 11260a0749
commit 37b1623adc
2 changed files with 10 additions and 14 deletions

View File

@@ -11,7 +11,7 @@ def computeCompileSdkVersion () {
return compileSdk return compileSdk
} }
else { else {
return 23 return 25
} }
} }
@@ -29,7 +29,7 @@ def computeTargetSdkVersion() {
return targetSdk return targetSdk
} }
else { else {
return 23 return 25
} }
} }

View File

@@ -522,24 +522,20 @@ class MeasureHelper {
} }
public void setInfinityWidth(boolean value) { public void setInfinityWidth(boolean value) {
if (this.infinityWidth != value) { this.infinityWidth = value;
this.infinityWidth = value;
for (int i = 0, size = this.columns.size(); i < size; i++) { for (int i = 0, size = this.columns.size(); i < size; i++) {
ItemGroup columnGroup = this.columns.get(i); ItemGroup columnGroup = this.columns.get(i);
columnGroup.setIsLengthInfinity(value); columnGroup.setIsLengthInfinity(value);
}
} }
} }
public void setInfinityHeight(boolean value) { public void setInfinityHeight(boolean value) {
if (this.infinityHeight != value) { this.infinityHeight = value;
this.infinityHeight = value;
for (int i = 0, size = this.rows.size(); i < size; i++) { for (int i = 0, size = this.rows.size(); i < size; i++) {
ItemGroup rowGroup = this.rows.get(i); ItemGroup rowGroup = this.rows.get(i);
rowGroup.setIsLengthInfinity(value); rowGroup.setIsLengthInfinity(value);
}
} }
} }