How to schedule heavy work for later display for Listviews?
Posted
by Pentium10
on Stack Overflow
See other posts from Stack Overflow
or by Pentium10
Published on 2010-03-26T22:58:08Z
Indexed on
2010/03/27
0:03 UTC
Read the original article
Hit count: 120
I have a listview with 200 items. I use a custom view for each row. There is a code that takes some time to calculate, and because of this the list hangs out on scrolling and loads in slow (2-3sec).
I have subclassed SimpleCursorAdapter, and using Filterable and SectionIndexer.
I have in mind to show initially the name of the record, and put in a thread the calculation, and will show up later when it's done.
How do I push back some work, and later update the listview to include the calculated data? This should show up on fly without user interaction.
© Stack Overflow or respective owner