android - CursorTreeAdapter - Return part of Groupcursor for Childview Data -


i'm using cursortreeadapter map curser expandablelistview in android.

everything works fine except way data handled inside listview. data inside cursor give constructor of cursortreeadater - daa childview. problem android expects data childview received getchildrencursor function:

@override protected cursor getchildrencursor(cursor groupcursor) {     db.open();     return db.getepisode(groupcursor.getstring(0)); } 

here see problem. have return cursor i'm not able "cut out" 1 entry in cursor responsible specific childview. instead came querying database every single childview there is. not dumb since data there (inside groupcursor) ist pretty slow.

my question if there kind of functionality of cloning specific entries of cursors or returning 1 entry instead of querying database.

maybe i'm off using cursortreeadapter , using more general adapterclass beneficial.

thank all, johannes

i figured our myself.

the answer switch cursortreeadapter baseexpandablelistadapter

i somehow scared before (dunno why) working charm.

if interested in code can post here. leave comment


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -