Android Question ImageDownloader show progress inside imageview

phukol

Active Member
Licensed User
Longtime User
Hi guys,

just want to ask how i can go about in displaying a progressbar or progress circle inside an imageview that is to be filled up by an imagedownloader. I want the progressbar to show up until the image has been downloaded.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Check the attached example.

B4A v5.80 (non-beta) includes a new View.Parent property.
You can replace it with:
B4X:
Dim jo As JavaObject = iv
Dim parent As Panel = jo.RunMethod("getParent", Null))
 

Attachments

  • ImageDownloaderWithProgressBar.zip
    8.5 KB · Views: 465
Upvote 0

Douglas Farias

Expert
Licensed User
Longtime User
thx for this code @Erel this is a good option to add on imagedownloader original post
and on line 44 change
parent.AddView(pb, iv.Left, iv.Top, iv.Width, iv.Height)
to
parent.AddView(pb, parent.Width / 2 -35dip, parent.Height / 2 -35dip, 70dip, 70dip)

to fix the progressbar on center and with good size
 
Upvote 0
Top