Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Android's ListView also is built around view recycling. But these are both situations where the framework supports the recycling.


Is it? I was going to add it to the list, but the Adapter that manages the data actually generates (and caches) a View for each element. Is there something I'm not understanding?


Yep it is. The Adapter will generate and cache a view for each item - but once the view moves off the screen, the adapter will reclaim/recycle that view, and the next item to request a view will be given the recycled view. In effect it is identical to the ios or flash list model.


Cool ... I knew I was passed back a "convertView" sometimes but didn't realize it was recycling them.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: