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

> Case in point: To make a list on Android, you need to jump through hoops, assign stuff to a "Tag" property (a field intended for hacks and workarounds), typecast your ass of, or if you don't do all that your list will perform absolutely shitty. So, the easy flow is a crappy, slow, buggy list. The "best practice" (which is not the easy flow, because hey, why would we make good stuff easy) is a "View Holder Pattern" [0] that involves using intended-for-hacks framework features.

You don't have to do that. For a list with homogenous items you can use a regular ol' ListAdapter, implement getView sensibly (i.e. re-use views, which is very little work) and it will perform just fine. We tried this with a list of 2,000 items (each item had two TextViews and an ImageView) and it was completely fluid on a Samsung Galaxy Ace.

> Android-o-world is full of not-entirely-good advice and bad examples. Jumping into Android reminded me of past PHP experience

I could not agree with this more. I'd say somewhere around 2/3 of StackOverflow Android answers are downright wrong.



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

Search: