When using clipToPadding in ListView's the items get recycled prematurely

前端 未结 1 967
伪装坚强ぢ
伪装坚强ぢ 2020-12-31 02:23

when setting

android:clipToPadding=\"false\"

in a standard ListView on a 2.3.3 android device I am seeing that the list items are being re

相关标签:
1条回答
  • 2020-12-31 02:44

    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.

    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 :(

    0 讨论(0)
提交回复
热议问题