am b2b02b9b: Fix a small UI nit with screen reordering

* commit 'b2b02b9bd2e0b0da7373125c06f6d67d9758d8fe':
  Fix a small UI nit with screen reordering
This commit is contained in:
Adam Cohen
2015-06-11 18:33:47 +00:00
committed by Android Git Automerger
+7
View File
@@ -567,6 +567,13 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc
public void scrollTo(int x, int y) {
// In free scroll mode, we clamp the scrollX
if (mFreeScroll) {
// If the scroller is trying to move to a location beyond the maximum allowed
// in the free scroll mode, we make sure to end the scroll operation.
if (!mScroller.isFinished() &&
(x > mFreeScrollMaxScrollX || x < mFreeScrollMinScrollX)) {
forceFinishScroller();
}
x = Math.min(x, mFreeScrollMaxScrollX);
x = Math.max(x, mFreeScrollMinScrollX);
}