滚动列表视图中的不同单元格高度 [英] scrolling in listview with different cell height
问题描述
我有一个列表视图和它的行具有不同的高度。
当我向上滚动,行出现不正常向上或向下移动。
(我不觉得行为,当我向下滚动)
我怀疑它是由于这样的事实:
- 在ListView中挑选用于行之一
- 在该行被放置在可见的行之上。
- 的ListView改变行的高度(此处无规律的运动)
但它是一个猜测。
我想谷歌搜索,因为这应该是一个普遍的问题,但找不到任何。
在这种情况下,制定正确的项目高度的伎俩:
<一个href="http://stackoverflow.com/questions/7512592/how-to-set-different-heights-for-each-row-in-a-listview">How在一个ListView设置不同高度的每一行?
编辑:哦,一定要正确地回收项目:
<一个href="http://stackoverflow.com/questions/6921462/listview-reusing-views-when-i-dont-want-it-to">ListView重用视图时......我不希望它
I have a listview and its rows have different heights.
When I scroll up, rows appear to move up or down erratically.
(I don't find the behavior when I scroll down)
I suspect its due to the fact
- listView picks one of used rows
- the row is placed on top of visible rows.
- listView changes the row's height(here erratic movement)
but it's a guess.
I tried googling since this should be a common problem but couldn't find any.
In this case, setting the right item height did the trick :
How to set different heights for each row in a ListView?
Edit: oh, and make sure you recycle the items correctly :
ListView reusing views when ... I don't want it to
这篇关于滚动列表视图中的不同单元格高度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!