I have a ListView in which, each row of the list has an ImageView and two TextViews. First I show a default image on each row, and when I get the images (which I'm getting from internet calling an url using AsyncTasks), I replace them with the default image on the corresponding row in the ListView. Now I want to show a progress dialog instead of the default image on each row, and when I get an image, I will replace that progress dialog with the corresponding image. But I'm not able to show the progress dialog on the ImageView on the rows of list view. I think the problem is that, to show Progress Dialog, it needs Context, I'm trying to pass View of the image. For 1 month now, I'm struggling with no success. So now I'm thinking, is it even possible to do that and if yes - how? Or is there any other widget I can use instead of ImageView to show Progress Dialog on it? Please help me. Thanks in advance.
Asked
Active
Viewed 537 times
0
-
1It can be a quick difficult for you to set in every row one progressbar. This way can reduce the performance of you app. The best way is to have a general progressbar for all rows. You can set your progressbar visibility so that it can wait for all images to be loaded bevor switching on "gone" – Festus Tamakloe Oct 26 '12 at 08:02
-
1@Festado : Thanks for your reply. And Yes, that can be 1 solution, but not here, because the client want to show Progress Dialog on each image and replace that with image as soon as i get the image. By the way, thanks. – Oct 26 '12 at 08:11
2 Answers
0
It can be a quick difficult for you to set in every row one progressbar. This way can reduce the performance of your app. The best way is to have a general progressbar for all rows. You can set your progressbar visibility so that it can wait for all images to be loaded bevor switching on "gone"

Festus Tamakloe
- 11,231
- 9
- 53
- 65
-
Thanks for your reply. And Yes, that can be 1 solution, but not here, because the client want to show Progress Dialog on each image and replace that with image as soon as i get the image. By the way, thanks. – Oct 26 '12 at 08:23
0
I have an alternative solution. Displaying multiple progress dialogs is not a good solution in this case. Instead of displaying a static image when loading the view, immediately display a progress/loading animation. For example a gif Here you can find reference how to do that. Here is an example gif file which seems suitable: http://peacechild.org/wp-content/uploads/2012/09/loading.gif
-
Thanks for your answer, though it's not the expected answer, but still its a solution. So thanks – Oct 26 '12 at 08:49