ListView not “refreshing” after item is deleted from it

后端 未结 6 1662
半阙折子戏
半阙折子戏 2021-01-28 16:27

I am trying to figure out how I \"Refresh\" the list view the user is on when an item from my listview is deleted. I have tried notifyDataSetChanged() but to no avail, which is

6条回答
  •  星月不相逢
    2021-01-28 17:10

    You can perfectly remove item from adapter by using following code.

    mCollection.remove(position);
    mListLayout.removeAllViews();
    notifyDataSetChanged();
    

提交回复
热议问题