ListView in ArrayAdapter order get's mixed up when scrolling

后端 未结 4 1901
清酒与你
清酒与你 2020-11-27 05:11

I have a ListView in a custom ArrayAdapter that displays an icon ImageView and a TextView in each row. When I make the list long enough to let you scroll through it, the or

4条回答
  •  清歌不尽
    2020-11-27 05:44

    The ListView reuses view objects when you scroll. Are you overriding the getView method? You need to make sure you set each property for every view, don't assume that it will remember what you had before. If you post that method, someone can probably point you at the part that is incorrect.

提交回复
热议问题