android - Child headers for ExpandableListView using CursorTreeAdapter -
how create header every expanded childview
without affecting underlying data , onclick / onlongclick events on childview
. below skeleton implementation of 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 helpful.
you can create layout xml load new view in newchildview function.
Comments
Post a Comment