当使用clipToPadding在ListView的项目得到回收prematurely项目、clipToPadding、ListView、prematurely

由网友(旧梦)分享简介:设置时,android:clipToPadding="false"在2.3.3 Android设备我看到的列表项正在被回收prematurely在一个标准的ListView。适配器的观点被删除时,它完全滚过的填充与被滚动过去导致被删除的看法为时尚早屏幕的边缘。有没有人能解决这个问题呢?in a standard L...

设置时,

android:clipToPadding="false"

在2.3.3 Android设备我看到的列表项正在被回收prematurely在一个标准的ListView。适配器的观点被删除时,它完全滚过的填充与被滚动过去导致被删除的看法为时尚早屏幕的边缘。有没有人能解决这个问题呢?

in a standard ListView on a 2.3.3 android device I am seeing that the list items are being recycled prematurely. The adapter's view is being removed when it is fully scrolled past the padding versus being scrolled past the edge of the screen resulting in views being removed too early. Has anyone been able to solve this issue?

推荐答案

剪辑来填充是默认的行为。有尽快回收的观点,因为它是不可见的(即过去的填充)是正常的和预期的行为。

Clip to padding is the default behavior. Having the view recycled as soon as it's not visible (i.e. past the padding) is the normal and expected behavior.

你确定你是不是要设置 clipToPadding ?在这种情况下,ListView控件仍然会尽快为他们进入填充区域回收它的孩子。属性 clipToPadding 只影响绘图,并没有考虑到布局算法,如的ListView 的。我们可以解决这个问题,在平台的未来版本,但不会帮助你,现在,对不起:(

Are you sure you're not trying to set clipToPadding to false? In that case, ListView will still recycle its children as soon as they enter the padding area. The attribute clipToPadding only affects drawing and is not taken into account by layout algorithms such as ListView's. We could fix this behavior in a future version of the platform but that won't help you right now, sorry :(

阅读全文

相关推荐

最新文章