如何清除ExpandableListView?

问题描述 投票:0回答:2

我正在使用可扩展列表视图作为树形视图结构,需要对其进行连续更新,但是由于我无法清除当前的可扩展列表视图,因此它会显示以前的数据以及新数据。就像我最小化并再次打开应用程序一样,列表视图中有重复的数据。

android expandablelistview expandablelistadapter
2个回答
0
投票
yourExpandableListView.setAdapter((BaseExpandableListAdapter)null);

0
投票
ExpandableListAdapter适配器=新的ExpandableListAdapter(); //或者您使用过的任何适配器/创建的listView.setAdapter(adapter)请尝试此
© www.soinside.com 2019 - 2024. All rights reserved.