how to refresh custom listview using baseadapter in android

后端 未结 5 754
无人及你
无人及你 2020-12-08 23:37

sir, how can i refresh my custom listview using baseadapter. i don\'t know what to place, or where to place it in my code. please help me. thanks in advance



        
5条回答
  •  一整个雨季
    2020-12-09 00:10

    create one custom method in BaseAdapter

    like:

     public void updateAdapter(ArrayList arrylst) {
            this.arrylst= arrylst;
    
            //and call notifyDataSetChanged
            notifyDataSetChanged();
        }
    

    and this function call where u want to call: e.g

    adapterObject.updateAdapter(Here pass ArrayList);

    done.

提交回复
热议问题