You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The author me with your project, the StaggeredGridView.java class error [ArrayIndexOutOfBoundsException] error has been found, ask the author to revise
The original code segment:
final int startFrom;
if (span > 1) {
int lowest = mItemBottoms[nextCol];
for (int i = nextCol + 1; i < nextCol + span; i++) {
final int bottom = mItemBottoms[i];
if (bottom > lowest) {
lowest = bottom;
}
}
startFrom = lowest;
} else {
startFrom = mItemBottoms[nextCol];
}
The modified code segment:
final int startFrom;
if (span > 1) {
int lowest = mItemTops[nextCol];
for (int i = nextCol + 1; i < nextCol + span; i++) {
final int bottom = mItemTops[i];
if (bottom > lowest) {
lowest = bottom;
}
}
startFrom = lowest;
} else {
startFrom = mItemTops[nextCol];
}
[mItemBottoms] Should be changed to [mItemTops]
The text was updated successfully, but these errors were encountered:
The author me with your project, the StaggeredGridView.java class error [ArrayIndexOutOfBoundsException] error has been found, ask the author to revise
The original code segment:
final int startFrom;
if (span > 1) {
int lowest = mItemBottoms[nextCol];
for (int i = nextCol + 1; i < nextCol + span; i++) {
final int bottom = mItemBottoms[i];
if (bottom > lowest) {
lowest = bottom;
}
}
startFrom = lowest;
} else {
startFrom = mItemBottoms[nextCol];
}
The modified code segment:
final int startFrom;
if (span > 1) {
int lowest = mItemTops[nextCol];
for (int i = nextCol + 1; i < nextCol + span; i++) {
final int bottom = mItemTops[i];
if (bottom > lowest) {
lowest = bottom;
}
}
startFrom = lowest;
} else {
startFrom = mItemTops[nextCol];
}
[mItemBottoms] Should be changed to [mItemTops]
The text was updated successfully, but these errors were encountered: