views:

42

answers:

0

How do I create a header for every expanded ChildView without affecting my underlying data and onClick / onLongClick events on the ChildView. Below is the skeleton implementation of my ExpandableListView adapter:

private class EAdapter extends CursorTreeAdapter {

public EAdapter(Cursor cursor, Context context) {
   super(cursor, context);
  }

  @Override
  protected void bindChildView(View view, Context context, Cursor cursor,
    boolean isLastChild) {

 }

  @Override
  protected void bindGroupView(View view, Context context, Cursor cursor,
    boolean isExpanded) {

 }

  ChildHolder childHolder;

  @Override
  protected View newChildView(Context context, Cursor cursor,
    boolean isLastChild, ViewGroup parent) {

  view.setTag(childHolder);
   registerForContextMenu(view);
   return view;
  }

  GroupHolder groupHolder;

  @Override
  protected View newGroupView(Context context, final Cursor cursor,
    boolean isExpanded, ViewGroup parent) {

view.setTag(groupHolder);
   return view;
  }

  @Override
  protected Cursor getChildrenCursor(Cursor groupCursor) {

 return cursor;
  }
}

Any help/pointers will be most helpful.