开发者

Android List adapter issue

开发者 https://www.devze.com 2022-12-23 13:45 出处:网络
How to remove item from a list view? ho开发者_如何学Gow to reload the list after removal?Here you can find all the informations.

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

精彩评论

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

关注公众号