am 08c09b0f: Merge "DO NOT MERGE. Only 1 edge glow should be growing at a time." into gingerbread

Merge commit '08c09b0f84b23627b4cd02e1b9a642952fbd2e7f' into gingerbread-plus-aosp

* commit '08c09b0f84b23627b4cd02e1b9a642952fbd2e7f':
  DO NOT MERGE. Only 1 edge glow should be growing at a time.
This commit is contained in:
Mindy Pereira
2010-09-26 18:37:04 -07:00
committed by Android Git Automerger

View File

@@ -2950,16 +2950,28 @@ public class WebView extends AbsoluteLayout
if (rangeY > 0 || getOverscrollMode() == OVERSCROLL_ALWAYS) {
if (y < 0 && oldY >= 0) {
mEdgeGlowTop.onAbsorb((int) mScroller.getCurrVelocity());
if (!mEdgeGlowBottom.isFinished()) {
mEdgeGlowBottom.onRelease();
}
} else if (y > rangeY && oldY <= rangeY) {
mEdgeGlowBottom.onAbsorb((int) mScroller.getCurrVelocity());
if (!mEdgeGlowTop.isFinished()) {
mEdgeGlowTop.onRelease();
}
}
}
if (rangeX > 0) {
if (x < 0 && oldX >= 0) {
mEdgeGlowLeft.onAbsorb((int) mScroller.getCurrVelocity());
if (!mEdgeGlowRight.isFinished()) {
mEdgeGlowRight.onRelease();
}
} else if (x > rangeX && oldX <= rangeX) {
mEdgeGlowRight.onAbsorb((int) mScroller.getCurrVelocity());
if (!mEdgeGlowLeft.isFinished()) {
mEdgeGlowLeft.onRelease();
}
}
}
}
@@ -5558,8 +5570,14 @@ public class WebView extends AbsoluteLayout
final int pulledToX = oldX + deltaX;
if (pulledToX < 0) {
mEdgeGlowLeft.onPull((float) deltaX / getWidth());
if (!mEdgeGlowRight.isFinished()) {
mEdgeGlowRight.onRelease();
}
} else if (pulledToX > rangeX) {
mEdgeGlowRight.onPull((float) deltaX / getWidth());
if (!mEdgeGlowLeft.isFinished()) {
mEdgeGlowLeft.onRelease();
}
}
}
@@ -5567,8 +5585,14 @@ public class WebView extends AbsoluteLayout
final int pulledToY = oldY + deltaY;
if (pulledToY < 0) {
mEdgeGlowTop.onPull((float) deltaY / getHeight());
if (!mEdgeGlowBottom.isFinished()) {
mEdgeGlowBottom.onRelease();
}
} else if (pulledToY > rangeY) {
mEdgeGlowBottom.onPull((float) deltaY / getHeight());
if (!mEdgeGlowTop.isFinished()) {
mEdgeGlowTop.onRelease();
}
}
}
}