且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

更新ExpandableListView与notifyDataSetChanged()

更新时间:2022-06-15 07:59:35

您需要添加一个 DeleteMethod 某种到适配器并从适配器项目手动,它不但从列表删除。

You need to add a DeleteMethod of some sort to the Adapter and remove the item from the Adapter manually, not only remove it from the List.

每次刷新的使用意见 notifyDataSetChanged()适配器将随时待命,环列表。你的列表适配器得到一个空值,由于你所做的更改。

Each time you refresh the the views using notifyDataSetChanged() the Adapter will call the loop around the List. Your List in the Adapter gets a null value due to the changes you made.