Greetings, I am attempting to use use a SimpleCursorTreeAdapter to display to two tables (Parent, Child) in a sqlite database. When I extend the SimpleCursorTreeAdapter I pass it a cursor referencing all of the root group nodes to be displayed, which is currently display correctly. Yet, I am confused over how to use the getChildrenCursor method.
I initially thought I should return a cursor referencing a table containing the root node id (_id) and the child nodes corresponding text (description), yet when doing so it displays all the child nodes text under each root node. Is the getChildrenCursor method the only function required for displaying child nodes? If so, is there a particular format (i.e. columns) that are required to properly display child nodes appropriately? Below is a brief example of what I am attempting to do: Table: parent (_id int, name text) [ 1, "George Washington"], [2, "Franklin Roosevelt"] Table: child (_id int, name text) [ 1, "Augustine Washington"], [2, "Anna Roosevelt"], [3, "John Roosevelt"] The above tables should be displayed as: + George Washington - Augustine Washington + Franklin Roosevelt -Anna Roosevelt -John Roosevelt Yet is displayed as: + George Washington - Augustine Washington -Anna Roosevelt -John Roosevelt + Franklin Roosevelt - Augustine Washington -Anna Roosevelt -John Roosevelt Any help would be greatly appreciated. Thanks in advance. MB --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~----------~----~----~----~------~----~------~--~---