2014-10-19 74 views

回答

0

是的,你可以使用ExpandableListView和ExpandableListAdapter,然后实现对ExpandableListAdapter的getChildrenCount方法是这样的:

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

这样做,只有在该集团将可扩展。