notifyDataSetChanged not working

后端 未结 2 1584
南方客
南方客 2020-12-18 03:20

My app uses a MultiColumnListView (https://github.com/huewu/PinterestLikeAdapterView) and as its name says it helps creating multi column list views.

T

2条回答
  •  星月不相逢
    2020-12-18 03:26

    You need to clear older myList.clear() and then call adapter.notifyDataSetChanged()

    Update:

    Change your code like:

    public MiAdaptadorListaComercios(Context c,List myList){
    this.contexto = c;
    this.myList = new ArrayList();
    }
    

    Also, do it like

    myList.clear();
    myList.addAll(originalList);   
    

提交回复
热议问题