2012-05-02 1 views
1

합니까 ExpandableListAdapter 내가ExpandableListView 및 getItemViewType

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

다양한보기 유형을 만들 수있는 BaseAdapter 무시 getItemViewType 및 getViewTypeCount으로 어떤 기능을 지원합니까?

감사

답변

2

ExpandableListAdapter하지 않습니다하지만 서브 클래스 BaseExpandableListAdapter가 수행합니다. 따라서 간접적으로 다른 하위 클래스 인 CursorTreeAdapter, ResourceCursorTreeAdapter, SimpleCursorTreeAdapter 및 SimpleExpandableListAdapter도 마찬가지입니다.

그 방법은 다음과 같습니다

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

대단히 감사합니다! –

+0

조심하십시오. 둘 다 API8에 추가되었습니다. – xmen