| Chunk |
|---|
| Conflicting content |
|---|
}
// Check to see if we have bumped into the scroll limit
<<<<<<< HEAD
if (atEdge && getChildCount() > 0) {
// Treat this like we're starting a new scroll from the current
// position. This will let the user start scrolling back into
// content immediately rather than needing to scroll back to the
// point where they hit the limit first.
int motionPosition = findMotionRow(y);
if (motionPosition >= 0) {
final View motionView = getChildAt(motionPosition - mFirstPosition);
mMotionViewOriginalTop = motionView.getTop();
=======
motionView = this.getChildAt(motionIndex);
if (motionView != null) {
// Check if the top of the motion view is where it is
// supposed to be
final int motionViewRealTop = motionView.getTop();
if (atEdge) {
// Apply overscroll
int overscroll = -incrementalDeltaY -
(motionViewRealTop - motionViewPrevTop);
overScrollBy(0, overscroll, 0, mScrollY, 0, 0,
0, mOverscrollDistance, true);
if (Math.abs(mOverscrollDistance) == Math.abs(mScrollY)) {
// Don't allow overfling if we're at the edge.
mVelocityTracker.clear();
}
final int overscrollMode = getOverScrollMode();
if (overscrollMode == OVER_SCROLL_ALWAYS ||
(overscrollMode == OVER_SCROLL_IF_CONTENT_SCROLLS &&
!contentFits())) {
mDirection = 0; // Reset when entering overscroll.
mTouchMode = TOUCH_MODE_OVERSCROLL;
if (rawDeltaY > 0) {
mEdgeGlowTop.onPull((float) overscroll / getHeight());
if (!mEdgeGlowBottom.isFinished()) {
mEdgeGlowBottom.onRelease();
}
} else if (rawDeltaY < 0) {
mEdgeGlowBottom.onPull((float) overscroll / getHeight());
if (!mEdgeGlowTop.isFinished()) {
mEdgeGlowTop.onRelease();
}
}
}
>>>>>>> 4f2c8cc86ad1b4c65806d7547407c60ea36b8abe
}
mMotionY = y;
mMotionPosition = motionPosition; |
| Solution content |
|---|
}
// Check to see if we have bumped into the scroll limit
if (atEdge && getChildCount() > 0) {
// Treat this like we're starting a new scroll from the current
// position. This will let the user start scrolling back into
// content immediately rather than needing to scroll back to the
// point where they hit the limit first.
int motionPosition = findMotionRow(y);
if (motionPosition >= 0) {
final View motionView = getChildAt(motionPosition - mFirstPosition);
mMotionViewOriginalTop = motionView.getTop();
}
mMotionY = y;
mMotionPosition = motionPosition; |
| File |
|---|
| AbsListView.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Comment |
| If statement |
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
mLastY = y;
}
break;
<<<<<<< HEAD
=======
case TOUCH_MODE_OVERSCROLL:
if (y != mLastY) {
final int rawDeltaY = deltaY;
deltaY -= mMotionCorrection;
int incrementalDeltaY = mLastY != Integer.MIN_VALUE ? y - mLastY : deltaY;
final int oldScroll = mScrollY;
final int newScroll = oldScroll - incrementalDeltaY;
int newDirection = y > mLastY ? 1 : -1;
if (mDirection == 0) {
mDirection = newDirection;
}
if (mDirection != newDirection) {
// Coming back to 'real' list scrolling
incrementalDeltaY = -newScroll;
mScrollY = 0;
// No need to do all this work if we're not going to move anyway
if (incrementalDeltaY != 0) {
trackMotionScroll(incrementalDeltaY, incrementalDeltaY);
}
// Check to see if we are back in
View motionView = this.getChildAt(mMotionPosition - mFirstPosition);
if (motionView != null) {
mTouchMode = TOUCH_MODE_SCROLL;
// We did not scroll the full amount. Treat this essentially like the
// start of a new touch scroll
final int motionPosition = findClosestMotionRow(y);
mMotionCorrection = 0;
motionView = getChildAt(motionPosition - mFirstPosition);
mMotionViewOriginalTop = motionView.getTop();
mMotionY = y;
mMotionPosition = motionPosition;
}
} else {
overScrollBy(0, -incrementalDeltaY, 0, mScrollY, 0, 0,
0, mOverscrollDistance, true);
final int overscrollMode = getOverScrollMode();
if (overscrollMode == OVER_SCROLL_ALWAYS ||
(overscrollMode == OVER_SCROLL_IF_CONTENT_SCROLLS &&
!contentFits())) {
if (rawDeltaY > 0) {
mEdgeGlowTop.onPull((float) -incrementalDeltaY / getHeight());
if (!mEdgeGlowBottom.isFinished()) {
mEdgeGlowBottom.onRelease();
}
} else if (rawDeltaY < 0) {
mEdgeGlowBottom.onPull((float) -incrementalDeltaY / getHeight());
if (!mEdgeGlowTop.isFinished()) {
mEdgeGlowTop.onRelease();
}
}
invalidate();
}
if (Math.abs(mOverscrollDistance) == Math.abs(mScrollY)) {
// Don't allow overfling if we're at the edge.
mVelocityTracker.clear();
}
}
mLastY = y;
mDirection = newDirection;
}
break;
>>>>>>> 4f2c8cc86ad1b4c65806d7547407c60ea36b8abe
}
break; |
| Solution content |
|---|
mLastY = y;
}
break;
}
break; |
| File |
|---|
| AbsListView.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Break statement |
| Case statement |
| If statement |