Trying to programmatically set the state of a SWITCH inside a LISTVIEW after the listview is displayed

前端 未结 2 1134
青春惊慌失措
青春惊慌失措 2021-01-19 03:26

So i have a list of alarms and i bind that to the listview, lstAlarms. In my custom ListView layout, i also have a switch, which i want to be set programmatically according

2条回答
  •  庸人自扰
    2021-01-19 04:25

    does your adapter use the viewholder pattern? If not, the Views that go off screen are reused and may have old switch status that the new row coming in when scrolling should not have.

提交回复
热议问题