AH, I GET IT NOW!

I was having awful troubles with an ArrayAdapter recycling random
views to me, in a list which used different kinds of views.  The
errors were maddening until I figured out what was going on, using
that part of your book.  It's absolutely insane...until you understand
why they do it, and then it makes (some) sense. Phew.

-- Eric

On Sep 19, 4:34 am, Mark Murphy <[email protected]> wrote:
> Carmen Delessio wrote:
> > Watch this video:
> >http://code.google.com/events/io/sessions/TurboChargeUiAndroidFast.html
> > Check Mark Murphy's bookhttp://commonsware.com/Android/index.html
>
> > Read several posts here:
> >http://www.androidguys.com/2008/07/14/fancy-listviews-part-one/
>
> > Short answer:
> > ConvertView is a previously returned view. You can reuse it without
> > having to make a view from scratch.
> > So you can avoid costly operations.  So you are correct about optimization.
> > See the holder pattern.
>
> Thanks for the shout-out!
>
> Since those blog posts are as old as the hills (in Android years), I
> make the chapter in my original book that covers this topic available as
> a free excerpt:
>
> http://commonsware.com/Android/excerpt.pdf
>
> For short lists, convertView is not a big deal. For long lists, it's
> rather important to avoid creating ten tons of (memory) garbage.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> _Android Programming Tutorials_ Version 1.0 Available!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to