问题
The documentation for HorizontalScrollView has the following:
You should never use a HorizontalScrollView with a ListView, since ListView takes care of its own scrolling. Most importantly, doing this defeats all of the important optimizations in ListView for dealing with large lists, since it effectively forces the ListView to display its entire list of items to fill up the infinite container supplied by HorizontalScrollView.
The reasoning here seems to apply to a (vertically scrolling) ScrollView, since ListView also scrolls vertically. But ScrollView doesn't have any such caveat. Did Google put this warning in the wrong class, or am I not understanding something?
回答1:
Looks like it is a bug indeed: http://code.google.com/p/android/issues/detail?id=2781
来源:https://stackoverflow.com/questions/4825086/horizontalscrollview-with-listview-documentation-bug