我需要在childClick上迭代ExpandableListView子节点并更改childView。 我怎样才能做到这一点?更改childView后我应该通知适配器吗?
// Adapter
FinancesExpListViewAdapter adapter = new FinancesExpListViewAdapter(getApplicationContext(), groups, moneyAdapter);
// ExpandableListView
listView.setAdapter(adapter);
listView.setOnChildClickListener(new ExpandableListView.OnChildClickListener() {
@Override
public boolean onChildClick(ExpandableListView parent, View v, int groupPosition, int childPosition, long id) {
for(int i = 0; i < adapter.getGroupCount();i++) {
for(int k = 0; k < adapter.getChildrenCount(i); k++) {
//to do here
}
}
return false;
}
});