How do I profile the code? I do recycle bitmaps since each list item
displays its own bitmap image and without recycling I quickly run out
of memory.

On Aug 26, 10:50 pm, Dianne Hackborn <[email protected]> wrote:
> Run your code in a profiler.
>
> Make sure you aren't thrashing through temporary objects.  If the GC is
> running much while scrolling, optimize to reduce temp objects.
>
>
>
>
>
> On Thu, Aug 26, 2010 at 6:18 PM, ls02 <[email protected]> wrote:
> > I have list view with fairly complex list view items consisting of
> > several image views, several text views, progress bars, etc. Depending
> > on the state of the item some of these elements can be show and some
> > are hidden. I understand that listview recycles views. Right now I am
> > dealing with slow listview scrolling especially on lower powered
> > devices. What's the best way to deal with this problem?
>
> > I already optimized each list item view as much as I could. Now I am
> > facing with what's the best? Use one single view with many children
> > for all items and hide and show various children depending on the item
> > state. This way I do not inflate each item view as list is being
> > scrolled but need to show and hide constantly various child views.
>
> > Another approach is to build item view dynamically each time view is
> > requested in the adapter getView method. In this case I can only add
> > at run time those elements that are truly needed for current item
> > state but this requires inflating item view every time.
>
> > Finally  the third approach is most extreme is to have one custom view
> > and draw everything myself. This of cause requires a lot of work.
>
> > --
> > 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]<android-developers%2bunsubs­[email protected]>
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Dianne Hackborn
> Android framework engineer
> [email protected]
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.- Hide quoted text -
>
> - Show quoted text -

-- 
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