Skip to content

Commit 5a88382

Browse files
scottamainAndroid (Google) Code Review
authored andcommitted
Merge "docs: fix document issue 27549" into jb-dev
2 parents 399df56 + 15279cf commit 5a88382

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

core/java/android/widget/HorizontalScrollView.java

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,18 +47,13 @@
4747
* is a {@link LinearLayout} in a horizontal orientation, presenting a horizontal
4848
* array of top-level items that the user can scroll through.
4949
*
50-
* <p>You should never use a HorizontalScrollView with a {@link ListView}, since
51-
* ListView takes care of its own scrolling. Most importantly, doing this
52-
* defeats all of the important optimizations in ListView for dealing with
53-
* large lists, since it effectively forces the ListView to display its entire
54-
* list of items to fill up the infinite container supplied by HorizontalScrollView.
55-
*
5650
* <p>The {@link TextView} class also
57-
* takes care of its own scrolling, so does not require a ScrollView, but
51+
* takes care of its own scrolling, so does not require a HorizontalScrollView, but
5852
* using the two together is possible to achieve the effect of a text view
5953
* within a larger container.
6054
*
61-
* <p>HorizontalScrollView only supports horizontal scrolling.
55+
* <p>HorizontalScrollView only supports horizontal scrolling. For vertical scrolling,
56+
* use either {@link ScrollView} or {@link ListView}.
6257
*
6358
* @attr ref android.R.styleable#HorizontalScrollView_fillViewport
6459
*/

core/java/android/widget/ScrollView.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,18 @@
4949
* manager with a complex hierarchy of objects. A child that is often used
5050
* is a {@link LinearLayout} in a vertical orientation, presenting a vertical
5151
* array of top-level items that the user can scroll through.
52-
*
52+
* <p>You should never use a ScrollView with a {@link ListView}, because
53+
* ListView takes care of its own vertical scrolling. Most importantly, doing this
54+
* defeats all of the important optimizations in ListView for dealing with
55+
* large lists, since it effectively forces the ListView to display its entire
56+
* list of items to fill up the infinite container supplied by ScrollView.
5357
* <p>The {@link TextView} class also
5458
* takes care of its own scrolling, so does not require a ScrollView, but
5559
* using the two together is possible to achieve the effect of a text view
5660
* within a larger container.
5761
*
58-
* <p>ScrollView only supports vertical scrolling.
62+
* <p>ScrollView only supports vertical scrolling. For horizontal scrolling,
63+
* use {@link HorizontalScrollView}.
5964
*
6065
* @attr ref android.R.styleable#ScrollView_fillViewport
6166
*/

0 commit comments

Comments
 (0)