2012-07-12 89 views

回答

0

在您的可擴展列表適配器中,您有一個名爲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. 
     } 
    }