ExpandableListView删除子view,子view中的size为0时删除父view

来源:互联网 发布:网络电玩城24小时下分 编辑:程序博客网 时间:2024/06/03 12:11

最近用到ExpandableListView删除子view,记录一下

myCommotidyList.get(groupPosition).getPurchasing_agent_products().remove(childPosition);

删除到子view的size为0 时,做判断然后直接移除父view

if (myCommotidyList.get(groupPosition).getPurchasing_agent_products().size() < 1) {    myCommotidyList.remove(groupPosition);}

然后刷新adapter。

阅读全文
0 0
原创粉丝点击