0
如何在ExpandableListView展開時更改groupItem的顏色? 當它沒有展開時變爲白色?Android擴展列表項
如何在ExpandableListView展開時更改groupItem的顏色? 當它沒有展開時變爲白色?Android擴展列表項
在您的可擴展列表適配器中,您有一個名爲getGroupView()的方法,通過使用該方法可以執行此操作。
public View getGroupView(int groupPosition, boolean isExpanded, View convertView,
ViewGroup parent) {
//Here you can initialize your view
if(isExpanded){
// set color for expanded item.
}else{
// set color for non expanded item.
}
}