getView called with wrong position when scrolling fast

后端 未结 5 1821
臣服心动
臣服心动 2020-12-16 03:17

fairly new Android developer here.

I\'ve come across a strange problem that I\'m not sure how to work around. I\'ve read a lot of problems around here that sound lik

5条回答
  •  轮回少年
    2020-12-16 03:53

    getViewis called for every list item that needs to be drawn but was previously not visible on screen. If you scroll fast you might get strange positions but that should not cause errors as you describe (I guess Android has no error here since those ListViews are pretty well tested). E.g. when you scroll fast enough you might have 2 views that need to get drawn. Maybe there is something else wrong in your code.

提交回复
热议问题