Reputation: 333
How to remove item from a list view? how to reload the list after removal?
Upvotes: 2
Views: 6940
Reputation: 8007
Here you can find all the informations.
Anyway you can call
mListAdapter.remove(x); // to remove an item
and
mListAdapter.invalidate(); // to refresh the content
or
mListAdapter.notifyDataSetChanged();
Upvotes: 6
Reputation: 55754
Please, there's no need to write with multiple question marks like that. Removing items from your ListView depends on how you put in the items in the beginning. Edit your question to provide some details on how you did that. Updating your list afterwards can be done with notifyDataSetChanged()
called by your ListView adapter.
Upvotes: 1
Reputation: 208042
Remove from the adapter, and the list will refresh automatically.
Upvotes: 0