Loading core/java/android/widget/HorizontalScrollView.java +5 −4 Original line number Diff line number Diff line Loading @@ -890,14 +890,15 @@ public class HorizontalScrollView extends FrameLayout { */ @Override protected int computeHorizontalScrollRange() { int count = getChildCount(); final int count = getChildCount(); final int contentWidth = getWidth() - mPaddingLeft - mPaddingRight; if (count == 0) { return getWidth(); return contentWidth; } int scrollRange = getChildAt(0).getRight(); int scrollX = mScrollX; int overscrollRight = scrollRange - getWidth() - mPaddingLeft - mPaddingRight; final int scrollX = mScrollX; final int overscrollRight = Math.max(0, scrollRange - contentWidth); if (scrollX < 0) { scrollRange -= scrollX; } else if (scrollX > overscrollRight) { Loading core/java/android/widget/ScrollView.java +5 −4 Original line number Diff line number Diff line Loading @@ -892,14 +892,15 @@ public class ScrollView extends FrameLayout { */ @Override protected int computeVerticalScrollRange() { int count = getChildCount(); final int count = getChildCount(); final int contentHeight = getHeight() - mPaddingBottom - mPaddingTop; if (count == 0) { return getHeight(); return contentHeight; } int scrollRange = getChildAt(0).getBottom(); int scrollY = mScrollY; int overscrollBottom = scrollRange - getHeight() - mPaddingBottom - mPaddingTop; final int scrollY = mScrollY; final int overscrollBottom = Math.max(0, scrollRange - contentHeight); if (scrollY < 0) { scrollRange -= scrollY; } else if (scrollY > overscrollBottom) { Loading Loading
core/java/android/widget/HorizontalScrollView.java +5 −4 Original line number Diff line number Diff line Loading @@ -890,14 +890,15 @@ public class HorizontalScrollView extends FrameLayout { */ @Override protected int computeHorizontalScrollRange() { int count = getChildCount(); final int count = getChildCount(); final int contentWidth = getWidth() - mPaddingLeft - mPaddingRight; if (count == 0) { return getWidth(); return contentWidth; } int scrollRange = getChildAt(0).getRight(); int scrollX = mScrollX; int overscrollRight = scrollRange - getWidth() - mPaddingLeft - mPaddingRight; final int scrollX = mScrollX; final int overscrollRight = Math.max(0, scrollRange - contentWidth); if (scrollX < 0) { scrollRange -= scrollX; } else if (scrollX > overscrollRight) { Loading
core/java/android/widget/ScrollView.java +5 −4 Original line number Diff line number Diff line Loading @@ -892,14 +892,15 @@ public class ScrollView extends FrameLayout { */ @Override protected int computeVerticalScrollRange() { int count = getChildCount(); final int count = getChildCount(); final int contentHeight = getHeight() - mPaddingBottom - mPaddingTop; if (count == 0) { return getHeight(); return contentHeight; } int scrollRange = getChildAt(0).getBottom(); int scrollY = mScrollY; int overscrollBottom = scrollRange - getHeight() - mPaddingBottom - mPaddingTop; final int scrollY = mScrollY; final int overscrollBottom = Math.max(0, scrollRange - contentHeight); if (scrollY < 0) { scrollRange -= scrollY; } else if (scrollY > overscrollBottom) { Loading