我有一个数据库。例如,它包含两个表:部门和员工。两张表都有很多东西。数据将填充到ExpandableListView
. 现在我使用自定义适配器扩展CursorTreeAdapter
. 这种情况已经足够好了,但有时它的运行速度比我想要的要慢。性能是否取决于适配器类型?如果是这样,哪个适配器更好?
代码。
private class MyAdapter extends CursorTreeAdapter implements OnClickListener {
public MyAdapter(Cursor cursor, Context context) {
super(cursor, context);
// TODO Auto-generated constructor stub
}
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
}
@Override
protected Cursor getChildrenCursor(Cursor groupCursor) {
// TODO Auto-generated method stub
return null;
}
@Override
protected View newGroupView(Context context, Cursor cursor, boolean isExpanded, ViewGroup parent) {
// TODO Auto-generated method stub
return null;
}
@Override
protected void bindGroupView(View view, Context context, Cursor cursor, boolean isExpanded) {
// TODO Auto-generated method stub
}
@Override
protected View newChildView(Context context, Cursor cursor, boolean isLastChild, ViewGroup parent) {
// TODO Auto-generated method stub
return null;
}
@Override
protected void bindChildView(View view, Context context, Cursor cursor, boolean isLastChild) {
// TODO Auto-generated method stub
}
}