Android List view refresh

前端 未结 5 596
闹比i
闹比i 2020-11-27 19:02

I have one ListView which is showing me some data through an array (which is in another class and I\'m accessing it through it\'s object).

Whenever I delete an elem

5条回答
  •  爱一瞬间的悲伤
    2020-11-27 19:54

    I have no notifyDataSetChanged() method (Android 2.3).

    The following worked for me:

    getListView().invalidate();
    

    In my case I have changed the whole adapter and it still didn't refresh, so for me the method described above is the only working solution.

提交回复
热议问题