On Nov 30, 10:34 pm, umakantpatil <[email protected]> wrote: > I have been facing the problem. > > I tried posting on stackoverflow too. Below is the > link.http://stackoverflow.com/questions/4321329/listview-with-section-head... > > I have listview with headers. But it shows same list under each > header. Dont know why. On the link of stackoverflow, I have shared it > in detail. > > Can some one help me out please?
I think you have a programming error in the way you're dealing with your section object. The constructor for SimpleAdapter is mostly likely not making a deep copy of the section you are passing in each time that it's called. Every SimpleAdapter is probably just holding a reference to the same section you created at the top of the loop. Since you end up repeatedly accumulating and clearing the contents of section, you are actually modifying the same section used in each SimpleAdapter you create. Make a whole new section object each time you pass one to a SimpleAdapter instead of reusing the same one. Doug -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

