2013-06-03 54 views

回答

0

那麼,在OnChildClickListener#onChildClick(ExpandableListView parent, View v, int groupPosition, int childPosition, long id)你有groupPosition。

你應該有一個備份模型和模型數據爲組和兒童。在調用上述方法時,您可以這樣說:getModelData()。getGroupItem(groupPosition).setValue(some_custom_value)。

然後調用parent#notifyDataSetInvalidated();這將觸發一個完整的佈局和重畫列表。

getGroupView()之內,你應該有一些邏輯來確定如何根據上面的getModelData()。getValue()來繪製背景。