Thursday, June 7, 2012

Re: [android-developers] ExpandableListView advice

Thanks for the feedback. I have done more research and optimized the code so that scrolling is lot smoother.

On Friday, June 8, 2012 3:27:06 AM UTC+10, TreKing wrote:

as soon as I receive an item, I have to immediately add it, sort it and display it.

Use a collection data structure that maintains sorting and is optimized for inserting new elements. Adding an item to an ArrayList and then sorting each time is asking for slowness.
 
So how can I properly implement the 'getGroupView' function so that it has the correct convertView of my item at any given time?

Updating the convertView is what you're supposed to be doing, as it can and will contain data from rows that no longer visible and thus eligible for recycling.

-------------------------------------------------------------------------------------------------
TreKing - Chicago transit tracking app for Android-powered devices

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate