mirror of
https://github.com/alibaba/vlayout.git
synced 2026-10-18 13:50:31 +08:00
disable pre-layout when layout to start temp
This commit is contained in:
@@ -1153,7 +1153,8 @@ class ExposeLinearLayoutManagerEx extends LinearLayoutManager {
|
||||
}
|
||||
recycleByLayoutStateExpose(recycler, layoutState);
|
||||
}
|
||||
int remainingSpace = layoutState.mAvailable + layoutState.mExtra + recycleOffset;
|
||||
int remainingSpace = layoutState.mAvailable + layoutState.mExtra + (
|
||||
layoutState.mLayoutDirection == LayoutState.LAYOUT_START ? 0 : recycleOffset); //TODO ugly bug fix, should fix overlapOffset first
|
||||
while (remainingSpace > 0 && layoutState.hasMore(state)) {
|
||||
layoutChunkResultCache.resetInternal();
|
||||
layoutChunk(recycler, state, layoutState, layoutChunkResultCache);
|
||||
|
||||
@@ -536,7 +536,7 @@ public class RangeGridLayoutHelper extends BaseLayoutHelper {
|
||||
}
|
||||
|
||||
|
||||
result.mConsumed = maxSize + startSpace + endSpace + secondStartSpace + secondEndSpace - maxOverlapOffset;
|
||||
result.mConsumed = maxSize + startSpace + endSpace + secondStartSpace + secondEndSpace - maxOverlapOffset; //FIXME conflicts when layout to start
|
||||
|
||||
final boolean layoutStart = layoutState.getLayoutDirection() == LayoutStateWrapper.LAYOUT_START;
|
||||
int consumedGap = 0;
|
||||
@@ -625,7 +625,7 @@ public class RangeGridLayoutHelper extends BaseLayoutHelper {
|
||||
int left = 0, right = 0, top = 0, bottom = 0;
|
||||
if (layoutInVertical) {
|
||||
if (layoutStart) {
|
||||
bottom = layoutState.getOffset() - endSpace - secondEndSpace - (consumedGap) - lastUnconsumedSpace + maxOverlapOffset;
|
||||
bottom = layoutState.getOffset() - endSpace - secondEndSpace - (consumedGap) - lastUnconsumedSpace + maxOverlapOffset; //FIXME should minus maxOverlapOffset
|
||||
top = bottom - maxSize;
|
||||
} else {
|
||||
top = layoutState.getOffset() + startSpace + secondStartSpace + (consumedGap) + lastUnconsumedSpace - maxOverlapOffset;
|
||||
|
||||
Reference in New Issue
Block a user