Hallo group

First of, let me thank you for all the valuable information i have
found here so far. I am currently investigating the android platform
with my first more elaborate application (like so many of us are doing
here).

This leads me to a problem which i am currently facing: I am writing
an application which fetches images from the internet and displays
them in a a GridView. The loading process is executed multithreaded,
so that i can fetch multiple images at the same time (using the
concurrency Runnables and ExecutionService). I am displaying
placeholders for the images in the grid while they are loading and
would like to fade-in the image using an animation when they are done
loading. Here is where the problem comes in:

When playing the fade-in animation, the animation gets cut of as soon
as a new image is done loading and causes a refresh on the Adapter.
Since i have to use an android.widget.BaseAdapter to provide the data
to display in the GridView, the entire GridView gets refreshed when a
new image is loaded and is about to be displayed since I use
BaseAdapter.notifyDataSetChanged()to refresh the GridViews content.

When an images is done loading it causes a refresh via the notify
method and starts its fade animation. The animation playes fine but is
immediately cut of when another image is done loading and invokes
notifyDataSetChanged() itself, causing a global view refresh and
repopulates the entire view. Of course i don't want to display the
animation everytime the GridView gets refreshed but only the very
first time an image is displayed.

What i would need is to make the notifyDataSetChanged() not refresh
the entire GridView but only insert/refresh the one new image, leaving
the others in place and playing there animation. Maybe the GridView
and its Adapter is not the right widget for my task though.

Any help would be greatly appreciated and i am looking forward to
participate on this board. Smile

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" 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-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to