晚上逛了一下 eoe android论坛,见到一坨人千方百计的把ListView弄到ScrollView,还研究出一些策略,并引以为豪。eoe market也是用这样的设计,滚动条显示很诡异,时长时短。ListView 本来是不应该 放在 ScrollView 里的,Google员工 Roman Guy早已回复:“There is no need to put a ListView in a ScrollView since ListView already supports scrolling. Do NOT put a ListView inside a ScrollView. ListView already handles scrolling, you’re only going to run into trouble. “ 更详细的,大家可以看看他在 google i/o 上的ListView视频讲解。大家不要抱着侥幸的心理,要用正确的方法去做正确的事情。如果真的需要ListView不同行显示这样的设计,可以参考Mark Murphy提供的http://github.com/commonsguy/cwac-merge
If you enjoyed this post, make sure you subscribe to my RSS feed!
10 replies on “千万不要把Listview放在ScrollView里”
i just wanna thank you for sharing your this info on your blog
Sent via Blackberry
学习了。
[…] CWAC’d Up: Alternative Adapters 本博客文章: 千万不要把Listview放在ScrollView里 If you enjoyed this post, make sure you subscribe to my RSS […]
thx
有的時候是不得已的….設計常常會堅持他們自己搞出來的無俚頭想法….RD只有苦幹的份….
[…] 千万不要把Listview放在ScrollView里 […]
Thanks for the auspicious writeup. It in fact was once a amusement account it.
Look complex to far delivered agreeable from you!
However, how could we communicate?
[…] 不要把 ListView 放在 ScrollView ( http://blog.lytsing.org/archives/212.html […]
ScrollView不能包含ListView,那ScrollView设计是用来干什么的?这种设计是不是狗屎的缺陷啊?ScrollView处理页面滚动,却得自己处理所包含子控件的高度?还得选择性的包含子控件?
[…] 也许读者会上网一搜,发现有一大堆“解决方案”,有的甚至声称“完美解决”,但看了这篇博文后也许你会改变看法:《千万不要把Listview放在ScrollView里》。 […]