Loading api/current.xml +3 −1 Original line number Diff line number Diff line Loading @@ -177258,6 +177258,8 @@ </parameter> <parameter name="maxOverscrollY" type="int"> </parameter> <parameter name="isTouchEvent" type="boolean"> </parameter> </method> <method name="performClick" return="boolean" Loading Loading @@ -385546,7 +385548,7 @@ deprecated="not deprecated" visibility="public" > <parameter name="text" type="java.lang.String"> <parameter name="message" type="java.lang.String"> </parameter> </method> </class> core/java/android/view/View.java +8 −5 Original line number Diff line number Diff line Loading @@ -8686,13 +8686,15 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility * along the X axis. * @param maxOverscrollY Number of pixels to overscroll by in either direction * along the Y axis. * @param isTouchEvent true if this scroll operation is the result of a touch event. * @return true if scrolling was clamped to an overscroll boundary along either * axis, false otherwise. */ protected boolean overscrollBy(int deltaX, int deltaY, int scrollX, int scrollY, int scrollRangeX, int scrollRangeY, int maxOverscrollX, int maxOverscrollY) { int maxOverscrollX, int maxOverscrollY, boolean isTouchEvent) { final int overscrollMode = mOverscrollMode; final boolean canScrollHorizontal = computeHorizontalScrollRange() > computeHorizontalScrollExtent(); Loading Loading @@ -8770,10 +8772,11 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility clampedY = true; } // Bump the device with some haptic feedback if we're at the edge // and didn't start there. if ((overscrollHorizontal && clampedX && scrollX != left && scrollX != right) || (overscrollVertical && clampedY && scrollY != top && scrollY != bottom)) { // Bump the device with some haptic feedback if we're at the edge, // didn't start there, and the scroll is the result of a touch event. if (isTouchEvent && ((overscrollHorizontal && clampedX && scrollX != left && scrollX != right) || (overscrollVertical && clampedY && scrollY != top && scrollY != bottom))) { performHapticFeedback(HapticFeedbackConstants.SCROLL_BARRIER); } Loading core/java/android/webkit/WebView.java +2 −2 Original line number Diff line number Diff line Loading @@ -2670,7 +2670,7 @@ public class WebView extends AbsoluteLayout if (oldX != x || oldY != y) { overscrollBy(x - oldX, y - oldY, oldX, oldY, computeMaxScrollX(), computeMaxScrollY(), getViewWidth() / 3, getViewHeight() / 3); getViewWidth() / 3, getViewHeight() / 3, false); onScrollChanged(mScrollX, mScrollY, oldX, oldY); } } else { Loading Loading @@ -5021,7 +5021,7 @@ public class WebView extends AbsoluteLayout if ((deltaX | deltaY) != 0) { overscrollBy(deltaX, deltaY, mScrollX, mScrollY, computeMaxScrollX(), computeMaxScrollY(), getViewWidth() / 3, getViewHeight() / 3); getViewWidth() / 3, getViewHeight() / 3, true); } if (!getSettings().getBuiltInZoomControls()) { boolean showPlusMinus = mMinZoomScale < mMaxZoomScale; Loading core/java/android/widget/AbsListView.java +6 −4 Original line number Diff line number Diff line Loading @@ -2133,7 +2133,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te int overscroll = -incrementalDeltaY - (motionViewRealTop - motionViewPrevTop); overscrollBy(0, overscroll, 0, mScrollY, 0, 0, 0, getOverscrollMax()); 0, getOverscrollMax(), true); mTouchMode = TOUCH_MODE_OVERSCROLL; invalidate(); } Loading Loading @@ -2178,7 +2178,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te } } else { overscrollBy(0, -incrementalDeltaY, 0, mScrollY, 0, 0, 0, getOverscrollMax()); 0, getOverscrollMax(), true); invalidate(); } mLastY = y; Loading Loading @@ -2674,7 +2674,8 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te if (motionView != null) { // Tweak the scroll for how far we overshot int overshoot = -(delta - (motionView.getTop() - oldTop)); overscrollBy(0, overshoot, 0, mScrollY, 0, 0, 0, getOverscrollMax()); overscrollBy(0, overshoot, 0, mScrollY, 0, 0, 0, getOverscrollMax(), false); } float vel = scroller.getCurrVelocity(); if (delta > 0) { Loading Loading @@ -2706,7 +2707,8 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te if (scroller.computeScrollOffset()) { final int scrollY = mScrollY; final int deltaY = scroller.getCurrY() - scrollY; if (overscrollBy(0, deltaY, 0, scrollY, 0, 0, 0, getOverscrollMax())) { if (overscrollBy(0, deltaY, 0, scrollY, 0, 0, 0, getOverscrollMax(), false)) { startSpringback(); } else { invalidate(); Loading core/java/android/widget/HorizontalScrollView.java +2 −2 Original line number Diff line number Diff line Loading @@ -508,7 +508,7 @@ public class HorizontalScrollView extends FrameLayout { final int oldX = mScrollX; final int oldY = mScrollY; overscrollBy(deltaX, 0, mScrollX, 0, getScrollRange(), 0, getOverscrollMax(), 0); getOverscrollMax(), 0, true); onScrollChanged(mScrollX, mScrollY, oldX, oldY); } break; Loading Loading @@ -1042,7 +1042,7 @@ public class HorizontalScrollView extends FrameLayout { if (oldX != x || oldY != y) { overscrollBy(x - oldX, y - oldY, oldX, oldY, getScrollRange(), 0, getOverscrollMax(), 0); getOverscrollMax(), 0, false); onScrollChanged(mScrollX, mScrollY, oldX, oldY); } Loading Loading
api/current.xml +3 −1 Original line number Diff line number Diff line Loading @@ -177258,6 +177258,8 @@ </parameter> <parameter name="maxOverscrollY" type="int"> </parameter> <parameter name="isTouchEvent" type="boolean"> </parameter> </method> <method name="performClick" return="boolean" Loading Loading @@ -385546,7 +385548,7 @@ deprecated="not deprecated" visibility="public" > <parameter name="text" type="java.lang.String"> <parameter name="message" type="java.lang.String"> </parameter> </method> </class>
core/java/android/view/View.java +8 −5 Original line number Diff line number Diff line Loading @@ -8686,13 +8686,15 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility * along the X axis. * @param maxOverscrollY Number of pixels to overscroll by in either direction * along the Y axis. * @param isTouchEvent true if this scroll operation is the result of a touch event. * @return true if scrolling was clamped to an overscroll boundary along either * axis, false otherwise. */ protected boolean overscrollBy(int deltaX, int deltaY, int scrollX, int scrollY, int scrollRangeX, int scrollRangeY, int maxOverscrollX, int maxOverscrollY) { int maxOverscrollX, int maxOverscrollY, boolean isTouchEvent) { final int overscrollMode = mOverscrollMode; final boolean canScrollHorizontal = computeHorizontalScrollRange() > computeHorizontalScrollExtent(); Loading Loading @@ -8770,10 +8772,11 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility clampedY = true; } // Bump the device with some haptic feedback if we're at the edge // and didn't start there. if ((overscrollHorizontal && clampedX && scrollX != left && scrollX != right) || (overscrollVertical && clampedY && scrollY != top && scrollY != bottom)) { // Bump the device with some haptic feedback if we're at the edge, // didn't start there, and the scroll is the result of a touch event. if (isTouchEvent && ((overscrollHorizontal && clampedX && scrollX != left && scrollX != right) || (overscrollVertical && clampedY && scrollY != top && scrollY != bottom))) { performHapticFeedback(HapticFeedbackConstants.SCROLL_BARRIER); } Loading
core/java/android/webkit/WebView.java +2 −2 Original line number Diff line number Diff line Loading @@ -2670,7 +2670,7 @@ public class WebView extends AbsoluteLayout if (oldX != x || oldY != y) { overscrollBy(x - oldX, y - oldY, oldX, oldY, computeMaxScrollX(), computeMaxScrollY(), getViewWidth() / 3, getViewHeight() / 3); getViewWidth() / 3, getViewHeight() / 3, false); onScrollChanged(mScrollX, mScrollY, oldX, oldY); } } else { Loading Loading @@ -5021,7 +5021,7 @@ public class WebView extends AbsoluteLayout if ((deltaX | deltaY) != 0) { overscrollBy(deltaX, deltaY, mScrollX, mScrollY, computeMaxScrollX(), computeMaxScrollY(), getViewWidth() / 3, getViewHeight() / 3); getViewWidth() / 3, getViewHeight() / 3, true); } if (!getSettings().getBuiltInZoomControls()) { boolean showPlusMinus = mMinZoomScale < mMaxZoomScale; Loading
core/java/android/widget/AbsListView.java +6 −4 Original line number Diff line number Diff line Loading @@ -2133,7 +2133,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te int overscroll = -incrementalDeltaY - (motionViewRealTop - motionViewPrevTop); overscrollBy(0, overscroll, 0, mScrollY, 0, 0, 0, getOverscrollMax()); 0, getOverscrollMax(), true); mTouchMode = TOUCH_MODE_OVERSCROLL; invalidate(); } Loading Loading @@ -2178,7 +2178,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te } } else { overscrollBy(0, -incrementalDeltaY, 0, mScrollY, 0, 0, 0, getOverscrollMax()); 0, getOverscrollMax(), true); invalidate(); } mLastY = y; Loading Loading @@ -2674,7 +2674,8 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te if (motionView != null) { // Tweak the scroll for how far we overshot int overshoot = -(delta - (motionView.getTop() - oldTop)); overscrollBy(0, overshoot, 0, mScrollY, 0, 0, 0, getOverscrollMax()); overscrollBy(0, overshoot, 0, mScrollY, 0, 0, 0, getOverscrollMax(), false); } float vel = scroller.getCurrVelocity(); if (delta > 0) { Loading Loading @@ -2706,7 +2707,8 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te if (scroller.computeScrollOffset()) { final int scrollY = mScrollY; final int deltaY = scroller.getCurrY() - scrollY; if (overscrollBy(0, deltaY, 0, scrollY, 0, 0, 0, getOverscrollMax())) { if (overscrollBy(0, deltaY, 0, scrollY, 0, 0, 0, getOverscrollMax(), false)) { startSpringback(); } else { invalidate(); Loading
core/java/android/widget/HorizontalScrollView.java +2 −2 Original line number Diff line number Diff line Loading @@ -508,7 +508,7 @@ public class HorizontalScrollView extends FrameLayout { final int oldX = mScrollX; final int oldY = mScrollY; overscrollBy(deltaX, 0, mScrollX, 0, getScrollRange(), 0, getOverscrollMax(), 0); getOverscrollMax(), 0, true); onScrollChanged(mScrollX, mScrollY, oldX, oldY); } break; Loading Loading @@ -1042,7 +1042,7 @@ public class HorizontalScrollView extends FrameLayout { if (oldX != x || oldY != y) { overscrollBy(x - oldX, y - oldY, oldX, oldY, getScrollRange(), 0, getOverscrollMax(), 0); getOverscrollMax(), 0, false); onScrollChanged(mScrollX, mScrollY, oldX, oldY); } Loading