ListView in ArrayAdapter order get's mixed up when scrolling

Posted by Dan B on Stack Overflow See other posts from Stack Overflow or by Dan B
Published on 2010-06-02T05:29:58Z Indexed on 2010/06/02 5:33 UTC
Read the original article Hit count: 292

Filed under:
|
|

Hi, 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 order starts out right, but when I start to scroll down, some of the earlier entries start re-appearing. If I scroll back up, the old order changes. Doing this repeatedly eventually causes the entire list order to be seemingly random. So scrolling the list is either causing the child order to change, or the drawing is not refreshing correctly.

What could cause something like this to happen? I need the order the items are displayed to the user to be the same order they are added to the ArrayList, or at LEAST to remain in one static order. If I need to provide more detailed information, please let me know. Any help is appreciated. Thanks.

© Stack Overflow or respective owner

Related posts about android

Related posts about listview