Hi All, Wondering if someone can advice me on the following issue I have with my application.
My app (running on Android 2.2) has an expandable list view. It connects to a server and receives a number of items. Items can be none or in the range of 100's. I do not get a count of how many items I will receive. The items just keep coming. The items also come in random order. Each item has a unique ID. I would like to present these items on my ExpandableListView in a sorted manner (sorted by unique ID). Also each item will have one child which presents the user with information on that list (mostly in the form of textview and images).. For every new item that I receive from the server, I will add it to my local buffer (ArrayList). Once added, I sort the array and then add it to the ExpandableListView and call notifyDataSetChanged. The problem is that in the function getGroupView, convertView is only null the very first time. Once I inflate view it will use that, however, after sorting, the view then holds incorrect data. To solve the issue of showing correct data, I have to update the converView to show new data. However, then then presents a jerky scrolling as a lot of garbage collection starts to take place (as seen in LogCat). As I do not have any method of knowing that I have received all data from the server, I cannot wait on any external flag which means that as soon as I receive an item, I have to immediately add it, sort it and display it. So how can I properly implement the 'getGroupView' function so that it has the correct convertView of my item at any given time? Any advice would be appreciated. Thanks -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en