Hi All,

Just looking at options for data updating affecting items in a
ListView and have hit
a few issues/queries.

There seems to only be notifyDataSetChanged() and
notifyDataSetInvalidated(). While I
could use notifyDataSetChanged() I am most likely in my case to have
the scenario where
additional data has been added and it seems inefficient to say the
data has changed,
which can only be resolved by calling getCount() and then getView()
for all displayed items
where knowing the data has been appended would just require adjusting
the scrollbar. Is
there some way to achieve something similar to this as the market
seems happy populating
dynamically in a manner that seems to reflect my desired behaviour
(unless it just refreshes
it all that fast).

Next question is the situation where the data behind just one item has
changed. For instance
I may wish to download icons in a background thread, but display
available information with a
placeholder icon. The best idea I've had so far is to store a map of
indexes and views in my
adapter which I can check against then call getView directly myself to
have the view recycled
with the new data. I'd just need additional logic to handle removing
the map when the view gets
destroyed or when it's recycled in getView. Either a bi-directional
map (do we have one of those?)
or two maps. Is the above likely to be my best approach or is there
something built-in/better to
get it done.

Cheers,

Alan.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to