开发者

Android List adapter issue

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜