is this a correct way to make sectioned list in android?
<p>i have to make a sectioned list in my application. For this i am using the following approach:</p>

<ul>
<li>make a listview to contain the headers of each sections</li>
<li>the xml inflated in the getview of each item in the above list consists of a textview and a tablelayout</li>
<li>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.</li>
</ul>

<p>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).</p>

<p>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?</p>

<p>why is this happening?</p>

<p>Doesn't the idea mentioned above seem correct?</p>

<p>what is going wrong over here?</p>

<p>thank you in advance.</p>
