HorizontalScrollView with ListView--documentation bug?

丶灬走出姿态 提交于 2019-12-10 00:31:07

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!