2014-10-19 73 views

回答

0

是的,你可以使用ExpandableListView和ExpandableListAdapter,然後實現對ExpandableListAdapter的getChildrenCount方法是這樣的:

@Override 
public int getChildrenCount(int groupPosition) { 
    if(groupPosition == <THE EXPANDABLE POSITION>) { 
     return <number of items> 
    } else { 
     return 0; 
    } 
} 

這樣做,只有在該集團將可擴展。