Loading core/java/android/widget/ScrollView.java +5 −5 Original line number Diff line number Diff line Loading @@ -1473,16 +1473,16 @@ public class ScrollView extends FrameLayout { } mChildToScrollTo = null; // There is only one child final View child = getChildAt(0); final int childHeight = child.getMeasuredHeight(); if (!hasLayout()) { final int scrollRange = Math.max(0, childHeight - (b - t - mPaddingBottom - mPaddingTop)); if (mSavedState != null) { mScrollY = mSavedState.scrollPosition; mSavedState = null; } // mScrollY default value is "0" final int childHeight = (getChildCount() > 0) ? getChildAt(0).getMeasuredHeight() : 0; final int scrollRange = Math.max(0, childHeight - (b - t - mPaddingBottom - mPaddingTop)); // Don't forget to clamp if (mScrollY > scrollRange) { mScrollY = scrollRange; Loading Loading
core/java/android/widget/ScrollView.java +5 −5 Original line number Diff line number Diff line Loading @@ -1473,16 +1473,16 @@ public class ScrollView extends FrameLayout { } mChildToScrollTo = null; // There is only one child final View child = getChildAt(0); final int childHeight = child.getMeasuredHeight(); if (!hasLayout()) { final int scrollRange = Math.max(0, childHeight - (b - t - mPaddingBottom - mPaddingTop)); if (mSavedState != null) { mScrollY = mSavedState.scrollPosition; mSavedState = null; } // mScrollY default value is "0" final int childHeight = (getChildCount() > 0) ? getChildAt(0).getMeasuredHeight() : 0; final int scrollRange = Math.max(0, childHeight - (b - t - mPaddingBottom - mPaddingTop)); // Don't forget to clamp if (mScrollY > scrollRange) { mScrollY = scrollRange; Loading