当前位置: 动力学知识库 > 问答 > 编程问答 >

listview - Android List adapter issue

问题描述:

How to remove item from a list view? how 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.

分享给朋友:
您可能感兴趣的文章:
随机阅读: