Jyo*_*sna 6 android expandablelistview
在我的应用程序中我正在使用ExpandableListView.我正在使用扩展的适配器BaseExpandableListAdapter.我想刷新一下ExpandableListView.
我ExpandableListView的项目包含与数据库链接的删除按钮.如果我按下删除按钮,该项将从db中永久删除.但listview同时并不令人耳目一新.如果我再次运行该活动,那么它是令人耳目一新的但不是同时.我在用
mAdapter.notifyDataSetChanged();
Run Code Online (Sandbox Code Playgroud)
但它没有按我的意愿工作.为什么?
我刚刚调用了BaseExpandableListAdapter的以下重写方法,从那时起notifyDataSetChanged()工作.
@Override
public void registerDataSetObserver(DataSetObserver observer) {
super.registerDataSetObserver(observer);
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
9189 次 |
| 最近记录: |