继承关系
public abstract classt ResourceCursorTreeAdapter extends CursorTreeAdapter java.lang.Object android.widget.BaseExpandableListAdapter android.widget.CursorTreeAdapter android.widget.ResourceCursorTreeAdapter
直接子类
SimpleCursorTreeAdapter
它为cursor和ExpandableListView提供了连接的桥梁。 它让用户提供Group和child的布局文件id,然后它自己就可以为用户创建Group和child的View。
ResourceCursorTreeAdapter的子类有SimpleCursorTreeAdapter。
他实现了来自于CursorTreeAdapter的两个方法:
newChildView,newGroupView
但使用CursorTreeAdapter还需要实现下面三个方法:
abstract void bindChildView(View view, Context context, Cursor cursor, boolean isLastChild) abstract void bindGroupView(View view, Context context, Cursor cursor, boolean isExpanded) abstract Cursor getChildrenCursor(Cursor groupCursor)
public ResourceCursorTreeAdapter (Context context, Cursor cursor, int collapsedGroupLayout, int expandedGroupLayout, int childLayout, int lastChildLayout)
参数
public ResourceCursorTreeAdapter (Context context, Cursor cursor, int collapsedGroupLayout, int expandedGroupLayout, int childLayout)
参数
public ResourceCursorTreeAdapter (Context context, Cursor cursor, int groupLayout, int childLayout)
参数
protected abstract View newChildView (Context context, Cursor cursor, boolean isLastChild, ViewGroup parent)
创建一个新的子元素视图并持有指向数据的游标cursor。
参数
返回值
新创建的视图
protected abstract View newGroupView (Context context, Cursor cursor, boolean isExpanded, ViewGroup parent)
创建一个新的组视图并持有组中指向数据的游标cursor。
参数
返回值
新创建的视图