How to update the `ListView` according to `ArrayList`?

前端 未结 5 473
傲寒
傲寒 2021-01-29 08:37

I have an array of contacts that I am constantly updating. I want my ListView to update with my contacts.

Should I use an Adapter for that? I

5条回答
  •  暖寄归人
    2021-01-29 09:39

    so, You have to notify your ListView adapter that the data has changed.

    listViewAdapater.notifyDataSetChanged();
    

    hope, this would work

提交回复
热议问题