Android listview duplicates the item on scroll

后端 未结 2 1359
陌清茗
陌清茗 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

    0 讨论(0)
  • 2020-12-21 10:27

    call yourListViewadapter.notifyDataSetChanged() when data is changed

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