【发布时间】:2011-10-19 07:31:11
【问题描述】:
在我的应用程序中,我正在使用 ExpandableListView。我正在使用扩展 BaseExpandableListAdapter 的适配器。我要刷新ExpandableListView。
我的ExpandableListView 包含与数据库链接的带有删除按钮的项目。
如果我按下删除按钮,该项目将从数据库中永久删除。但是listview 并没有同时刷新。如果我再次运行该活动,它会令人耳目一新,但不是同时进行。
我正在使用
mAdapter.notifyDataSetChanged();
但它没有按我的意愿工作。 为什么?
【问题讨论】:
-
你是否也重新查询了
Cursor..? -
因为我只删除了该项目,因为不需要该光标。所以我没有使用那个
标签: android expandablelistview