提交 f51d9203 编写于 作者: T Takeshi Hagikura

Fix the view index used for stretching views. (#322)

Basically, it apply the same fix as another PR
https://github.com/google/flexbox-layout/pull/304
to the method that stretches views.
上级 649a8d7d
......@@ -1560,7 +1560,6 @@ class FlexboxHelper {
}
int flexDirection = mFlexContainer.getFlexDirection();
if (mFlexContainer.getAlignItems() == AlignItems.STRETCH) {
int viewIndex = fromIndex;
int flexLineIndex = 0;
if (mIndexToFlexLine != null) {
flexLineIndex = mIndexToFlexLine[fromIndex];
......@@ -1568,8 +1567,8 @@ class FlexboxHelper {
List<FlexLine> flexLines = mFlexContainer.getFlexLinesInternal();
for (int i = flexLineIndex, size = flexLines.size(); i < size; i++) {
FlexLine flexLine = flexLines.get(i);
for (int j = 0, itemCount = flexLine.mItemCount; j < itemCount;
j++, viewIndex++) {
for (int j = 0, itemCount = flexLine.mItemCount; j < itemCount; j++) {
int viewIndex = flexLine.mFirstIndex + j;
if (j >= mFlexContainer.getFlexItemCount()) {
continue;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册