Android: Wrong item checked when filtering listview

前端 未结 3 829
挽巷
挽巷 2021-01-06 13:25

I\'m suffering from the same issue as this question: Wrong item checked when filtering ListView in android

As suggested in the above question, I have an Hashset hold

3条回答
  •  甜味超标
    2021-01-06 13:45

    Could it be simply that you ListView does not know the data set changed? Call notifyDatSetChanged() on your adapter to let it know.

    my_adapter.notifyDataSetChanged();
    

    This will force a redraw of the list, with the updated data.

提交回复
热议问题