Horizo​​ntalScrollView与ListView控件 - 文档错误? [英] HorizontalScrollView with ListView--documentation bug?

查看:150
本文介绍了Horizo​​ntalScrollView与ListView控件 - 文档错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

该文档Horizo​​ntalScrollView有以下几点:

The documentation for HorizontalScrollView has the following:

您永远不应该使用   Horizo​​ntalScrollView有一个ListView,   因为ListView的照顾其自身的   滚动。最重要的是,这样做   这违背了所有重要的   优化ListView中处理   大名单,因为它有效地   强制ListView控件以显示其   项的整个列表填满   通过提供无限集装箱   Horizo​​ntalScrollView。

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.

的理由在这里似乎适用于(垂直滚动)滚动型,因为ListView控件也垂直滚动。但滚动型不具有任何这样的警告。难道谷歌把这个警告在错误的类,还是我不理解的东西?

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?

推荐答案

看起来这的确是一个错误:的 HTTP://$c$c.google.com/p/android/issues/detail ID = 2781

Looks like it is a bug indeed: http://code.google.com/p/android/issues/detail?id=2781

这篇关于Horizo​​ntalScrollView与ListView控件 - 文档错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆