2012-05-02 26 views
1

不ExpandableListAdapter支持任何功能BaseAdapter覆蓋getItemViewType和getViewTypeCount,我可以在ExpandableListView和getItemViewType

getChildView(int groupPosition, int childPosition, boolean isLastChild, View convertView, ViewGroup parent) 

創建不同的視圖類型?

感謝

回答

2

ExpandableListAdapter沒有,但它的子類BaseExpandableListAdapter一樣。因此,間接地,其他子類CursorTreeAdapter,ResourceCursorTreeAdapter,SimpleCursorTreeAdapter和SimpleExpandableListAdapter也會這樣做。

這些方法是:

public int getChildType(final int groupPosition, final int childPosition) 
    public int getChildTypeCount() 
+0

非常感謝您! –

+0

要小心,它們都是在API8中添加的 – xmen