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

I mean, this is just like how Apple implements its NSTableView. You have a datasource and you implement the table's data source delegates. NSTableView itself takes care of the whole reusing views thing.


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.


Adobe Flex had the same model and it worked quite well (despite the framework's other flaws).


It's basically a common pattern when it comes to UI for the lists, I remember MFC had it like a hundred years ago and I bet they weren't the 1st to do it this way.




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

Search: