Android listview duplicates the item on scroll

后端 未结 2 1364
陌清茗
陌清茗 2020-12-21 10:00

I have a listview with one textview and a button in each row. Button background is setting using some conditions. If i have number of rows in list and scrolled, the button b

2条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-21 10:14

    That sounds like an issue which is caused by the ListView re-using layout elements. Without seeing the code that is actually setting the image to the view it's a little hard to say for sure but maybe this blog post will help...

    http://android-developers.blogspot.com/2009/05/drawable-mutations.html

提交回复
热议问题