How to remove item from a list view? ho开发者_如何学Gow to reload the list after removal?
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();
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.
Remove from the adapter, and the list will refresh automatically.
精彩评论