Loading core/java/android/widget/HorizontalScrollView.java +10 −3 Original line number Diff line number Diff line Loading @@ -53,6 +53,8 @@ import java.util.List; * within a larger container. * * <p>HorizontalScrollView only supports horizontal scrolling. * * @attr ref android.R.styleable#HorizontalScrollView_fillViewport */ public class HorizontalScrollView extends FrameLayout { private static final int ANIMATED_SCROLL_GAP = ScrollView.ANIMATED_SCROLL_GAP; Loading Loading @@ -248,20 +250,25 @@ public class HorizontalScrollView extends FrameLayout { } /** * Indicates whether this ScrollView's content is stretched to fill the viewport. * Indicates whether this HorizontalScrollView's content is stretched to * fill the viewport. * * @return True if the content fills the viewport, false otherwise. * * @attr ref android.R.styleable#HorizontalScrollView_fillViewport */ public boolean isFillViewport() { return mFillViewport; } /** * Indicates this ScrollView whether it should stretch its content width to fill * the viewport or not. * Indicates this HorizontalScrollView whether it should stretch its content width * to fill the viewport or not. * * @param fillViewport True to stretch the content's width to the viewport's * boundaries, false otherwise. * * @attr ref android.R.styleable#HorizontalScrollView_fillViewport */ public void setFillViewport(boolean fillViewport) { if (fillViewport != mFillViewport) { Loading core/java/android/widget/ScrollView.java +6 −10 Original line number Diff line number Diff line Loading @@ -49,6 +49,8 @@ import java.util.List; * within a larger container. * * <p>ScrollView only supports vertical scrolling. * * @attr ref android.R.styleable#ScrollView_fillViewport */ public class ScrollView extends FrameLayout { static final int ANIMATED_SCROLL_GAP = 250; Loading Loading @@ -247,6 +249,8 @@ public class ScrollView extends FrameLayout { * Indicates whether this ScrollView's content is stretched to fill the viewport. * * @return True if the content fills the viewport, false otherwise. * * @attr ref android.R.styleable#ScrollView_fillViewport */ public boolean isFillViewport() { return mFillViewport; Loading @@ -258,6 +262,8 @@ public class ScrollView extends FrameLayout { * * @param fillViewport True to stretch the content's height to the viewport's * boundaries, false otherwise. * * @attr ref android.R.styleable#ScrollView_fillViewport */ public void setFillViewport(boolean fillViewport) { if (fillViewport != mFillViewport) { Loading Loading @@ -566,16 +572,6 @@ public class ScrollView extends FrameLayout { } } private int getScrollRange() { int scrollRange = 0; if (getChildCount() > 0) { View child = getChildAt(0); scrollRange = Math.max(0, child.getHeight() - getHeight() - mPaddingBottom - mPaddingTop); } return scrollRange; } /** * <p> * Finds the next focusable component that fits in this View's bounds Loading Loading
core/java/android/widget/HorizontalScrollView.java +10 −3 Original line number Diff line number Diff line Loading @@ -53,6 +53,8 @@ import java.util.List; * within a larger container. * * <p>HorizontalScrollView only supports horizontal scrolling. * * @attr ref android.R.styleable#HorizontalScrollView_fillViewport */ public class HorizontalScrollView extends FrameLayout { private static final int ANIMATED_SCROLL_GAP = ScrollView.ANIMATED_SCROLL_GAP; Loading Loading @@ -248,20 +250,25 @@ public class HorizontalScrollView extends FrameLayout { } /** * Indicates whether this ScrollView's content is stretched to fill the viewport. * Indicates whether this HorizontalScrollView's content is stretched to * fill the viewport. * * @return True if the content fills the viewport, false otherwise. * * @attr ref android.R.styleable#HorizontalScrollView_fillViewport */ public boolean isFillViewport() { return mFillViewport; } /** * Indicates this ScrollView whether it should stretch its content width to fill * the viewport or not. * Indicates this HorizontalScrollView whether it should stretch its content width * to fill the viewport or not. * * @param fillViewport True to stretch the content's width to the viewport's * boundaries, false otherwise. * * @attr ref android.R.styleable#HorizontalScrollView_fillViewport */ public void setFillViewport(boolean fillViewport) { if (fillViewport != mFillViewport) { Loading
core/java/android/widget/ScrollView.java +6 −10 Original line number Diff line number Diff line Loading @@ -49,6 +49,8 @@ import java.util.List; * within a larger container. * * <p>ScrollView only supports vertical scrolling. * * @attr ref android.R.styleable#ScrollView_fillViewport */ public class ScrollView extends FrameLayout { static final int ANIMATED_SCROLL_GAP = 250; Loading Loading @@ -247,6 +249,8 @@ public class ScrollView extends FrameLayout { * Indicates whether this ScrollView's content is stretched to fill the viewport. * * @return True if the content fills the viewport, false otherwise. * * @attr ref android.R.styleable#ScrollView_fillViewport */ public boolean isFillViewport() { return mFillViewport; Loading @@ -258,6 +262,8 @@ public class ScrollView extends FrameLayout { * * @param fillViewport True to stretch the content's height to the viewport's * boundaries, false otherwise. * * @attr ref android.R.styleable#ScrollView_fillViewport */ public void setFillViewport(boolean fillViewport) { if (fillViewport != mFillViewport) { Loading Loading @@ -566,16 +572,6 @@ public class ScrollView extends FrameLayout { } } private int getScrollRange() { int scrollRange = 0; if (getChildCount() > 0) { View child = getChildAt(0); scrollRange = Math.max(0, child.getHeight() - getHeight() - mPaddingBottom - mPaddingTop); } return scrollRange; } /** * <p> * Finds the next focusable component that fits in this View's bounds Loading