1

I would like to place a Progressbar over an Imageview until an image is loaded there using an async task so that the new bitmap will replace the progressbar drawable. I have checked out the Android animation drawable which uses a frame animation. But it didn't work well. What i need is a animated drawable that can be set to an imageview. I am using interfusers coverflow which extends the Gallery class of android. Hence cant use the trivial method of putting the imageview and a progressbar inside a Framelayout and dismissing it when image is loaded. Update: Another solution which came to my mind is to use a custom imageview which overrides the Android imageview and override the onDraw to draw a progressbar. Anybody, any ways to achieve that ?

Ajith M A
  • 3,838
  • 3
  • 32
  • 55

2 Answers2

0

I think it can be made much simples if you use a ViewFlipper.

Associate 2 views to it, one the image which you want to display finally and the other one the progress bar.

so, once you have the image the the progress to 100 and then flip the views to show the image

rock_win
  • 755
  • 1
  • 5
  • 14
0

I wanted to do the same and ended up using a progress bar on top of the image view inside a relative layout. The image view is by default invisible so that the progress bar is shown. When the image is loaded I toggle the visibility of both widgets.

Paris
  • 367
  • 3
  • 13
  • Yeah. Thats the commonly followed way. But i need an imageview that shows a progress bar. I cannot use a Frame or relative layout since iam using the Gallery widget. – Ajith M A Jun 18 '13 at 06:46