Reputation: 41
I am loading some images in a listView using the url from the rss feed. But the load a bit late in the EDGE connection, Can I use a small progess dialog during the loading of the images?
Upvotes: 0
Views: 249
Reputation: 1094
you can use this code for that
animation file
......
....
final AnimationDrawable frameAnimation = (AnimationDrawable) getResources().getDrawable(R.anim.animation_loding);
imageView.setImageDrawable(frameAnimation);
Timer timer = new Timer();
timer.schedule(new TimerTask() {
@Override
public void run() {
frameAnimation.start();
}
}, 0);
Upvotes: 1
Reputation: 1168
I had the very same problem. I implemented a ASyncImageView which extends ImageView. Every ASyncImageView has an ASyncTask running and getting the image for it in the background while the list is already loaded. This way the images will get there on their own and the listview is still there.
Upvotes: 0
Reputation: 16068
If you are using an AsyncTask to get the data from your RSS feed, you can place a ProgressDialog in your PreExecute (init) and PostExecute (dismiss). That would overlay your activity.
I am not sure the best way to use a progress animation inside the ImageView itself.
Upvotes: 0