I'm trying to make list of items, where each item may have other item with a value connected to it. Something like:
- Item 1
- **SubItem1.1 - val1
- **SubItem1.2 - val2
- Item 2
- **SubItem2.1 - val3
- Item3
- **SubItem3.1 - val4
- **SubItem3.2 - val5
- **SubItem3.3 - val6
There might be a dynamic number of Items and a dynamic number of Sub-items for each Item. There is always one value for each subitem. The Items, subItems and values are found from a database, but there are an alogrithm with calculations to get the correct subitems and values for each Item, so I do not think I can use a SimpleCursorAdapter directly.
How should I write this adapter and what should the xml-files look like. Do I need two xml-files with ListView? (Since there basically are two lists? (One with Items, and one list for each Item with Sub-items/values))