ExpandableListAdapter 是否支持 BaseAdapter 重写 getItemViewType 和 getViewTypeCount 等功能,我可以在
中创建各种 View 类型getChildView(int groupPosition, int childPosition, boolean isLastChild, View convertView, ViewGroup parent)
?
谢谢
最佳答案
ExpandableListAdapter 没有,但它的子类 BaseExpandableListAdapter 可以。因此,其他子类 CursorTreeAdapter、ResourceCursorTreeAdapter、SimpleCursorTreeAdapter 和 SimpleExpandableListAdapter 也间接地这样做。
这些方法是:
public int getChildType(final int groupPosition, final int childPosition)
public int getChildTypeCount()
关于android - ExpandableListView 和 getItemViewType,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10412018/