Android: how to refresh ListView contents?

后端 未结 9 962
渐次进展
渐次进展 2020-11-28 04:58

My ListView is using an extension of BaseAdapter, I can not get it to refresh properly. When I refresh, it appears that the old data draws on top

9条回答
  •  余生分开走
    2020-11-28 06:01

    Another easy way:

    //In your ListViewActivity:
    public void refreshListView() {
        listAdapter = new ListAdapter(this);
        setListAdapter(listAdapter);
    }
    

提交回复
热议问题