Loading api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -56669,6 +56669,7 @@ package android.widget { method public boolean isFillViewport(); method public boolean isSmoothScrollingEnabled(); method public boolean pageScroll(int); method public void scrollToDescendant(android.view.View); method public void setFillViewport(boolean); method public void setSmoothScrollingEnabled(boolean); method public final void smoothScrollBy(int, int); core/java/android/widget/ScrollView.java +14 −10 Original line number Diff line number Diff line Loading @@ -111,7 +111,7 @@ public class ScrollView extends FrameLayout { * layout is dirty. This prevents the scroll from being wrong if the child has not been * laid out before requesting focus. */ @UnsupportedAppUsage @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 123769715) private View mChildToScrollTo = null; /** Loading Loading @@ -1384,7 +1384,8 @@ public class ScrollView extends FrameLayout { * * @param child the View to scroll to */ private void scrollToChild(View child) { public void scrollToDescendant(View child) { if (!mIsLayoutDirty) { child.getDrawingRect(mTempRect); /* Offset from child's local coordinates to ScrollView coordinates */ Loading @@ -1395,6 +1396,9 @@ public class ScrollView extends FrameLayout { if (scrollDelta != 0) { scrollBy(0, scrollDelta); } } else { mChildToScrollTo = child; } } /** Loading Loading @@ -1488,7 +1492,7 @@ public class ScrollView extends FrameLayout { public void requestChildFocus(View child, View focused) { if (focused != null && focused.getRevealOnFocusHint()) { if (!mIsLayoutDirty) { scrollToChild(focused); scrollToDescendant(focused); } else { // The child may not be laid out yet, we can't compute the scroll yet mChildToScrollTo = focused; Loading Loading @@ -1569,7 +1573,7 @@ public class ScrollView extends FrameLayout { mIsLayoutDirty = false; // Give a child focus if it needs it if (mChildToScrollTo != null && isViewDescendantOf(mChildToScrollTo, this)) { scrollToChild(mChildToScrollTo); scrollToDescendant(mChildToScrollTo); } mChildToScrollTo = null; Loading Loading
api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -56669,6 +56669,7 @@ package android.widget { method public boolean isFillViewport(); method public boolean isSmoothScrollingEnabled(); method public boolean pageScroll(int); method public void scrollToDescendant(android.view.View); method public void setFillViewport(boolean); method public void setSmoothScrollingEnabled(boolean); method public final void smoothScrollBy(int, int);
core/java/android/widget/ScrollView.java +14 −10 Original line number Diff line number Diff line Loading @@ -111,7 +111,7 @@ public class ScrollView extends FrameLayout { * layout is dirty. This prevents the scroll from being wrong if the child has not been * laid out before requesting focus. */ @UnsupportedAppUsage @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 123769715) private View mChildToScrollTo = null; /** Loading Loading @@ -1384,7 +1384,8 @@ public class ScrollView extends FrameLayout { * * @param child the View to scroll to */ private void scrollToChild(View child) { public void scrollToDescendant(View child) { if (!mIsLayoutDirty) { child.getDrawingRect(mTempRect); /* Offset from child's local coordinates to ScrollView coordinates */ Loading @@ -1395,6 +1396,9 @@ public class ScrollView extends FrameLayout { if (scrollDelta != 0) { scrollBy(0, scrollDelta); } } else { mChildToScrollTo = child; } } /** Loading Loading @@ -1488,7 +1492,7 @@ public class ScrollView extends FrameLayout { public void requestChildFocus(View child, View focused) { if (focused != null && focused.getRevealOnFocusHint()) { if (!mIsLayoutDirty) { scrollToChild(focused); scrollToDescendant(focused); } else { // The child may not be laid out yet, we can't compute the scroll yet mChildToScrollTo = focused; Loading Loading @@ -1569,7 +1573,7 @@ public class ScrollView extends FrameLayout { mIsLayoutDirty = false; // Give a child focus if it needs it if (mChildToScrollTo != null && isViewDescendantOf(mChildToScrollTo, this)) { scrollToChild(mChildToScrollTo); scrollToDescendant(mChildToScrollTo); } mChildToScrollTo = null; Loading