i have to make a sectioned list in my application. For this i am using the following approach:
- make a listview to contain the headers of each sections
- the xml inflated in the getview of each item in the above list consists of a textview and a tablelayout
- the custom adapter used to make the views for the above listview, i fill the textview with the header and add rows into the tablelayout until all the section is filled.
Naturally i maintain two arrays: 1) for the headers 2) for the section details(actually for this i use a hashmap with the section header index in its array as the key, this is my of identifying which header belongs to which section).
for some reason the above code is not working and the data is being repeated in different sections...eg. the second section contains data of the 1st and the 2nd section combined?
why is this happening?
Doesn't the idea mentioned above seem correct?
what is going wrong over here?
thank you in advance.