Android Question Create Circle Imageview After Download images

PumaCyan

Member
Licensed User
I have a list of data using CLV
and there is a downloaded image
but I have difficulty in making the image into a circle after the image download process is complete.

Does every picture that is downloaded must first be saved in memory to make a circle? then called locally?
I have also used the XUI round image module.
but i am still confused to apply it ...

I have already implemented it from This thread
but it might be quite troublesome if every image must be saved locally first
 
Last edited:

Erel

B4X founder
Staff member
Licensed User
Longtime User
Upvote 0

PumaCyan

Member
Licensed User
What does it mean "saved in memory"?

I mean, like this :

B4X:
Sub DownloadAndSaveFile (Link As String)
    Dim j As HttpJob
    j.Initialize("", Me)
    j.Download(Link)
    Wait For (j) JobDone(j As HttpJob)
    If j.Success Then
        Dim out As OutputStream = File.OpenOutput(File.DirInternal, "temp.png", False) ' <--- does this is save in phone ?
        File.Copy2(j.GetInputStream, out)
        out.Close
    End If
    j.Release
End Sub

then load into :

B4X:
Dim img As B4XBitmap = xui.LoadBitmap(File.DirAssets, "temp.png")
Dim xIV As B4XView = ImageViewCircularImage
xIV.SetBitmap(CreateRoundBitmap(img, xIV .Width))

So.. i think it's must be download image then save images, then we load it into imageview to make circle?
Corret Me if i'm wrong...
thank's...
 
Upvote 0

PumaCyan

Member
Licensed User
For example in this picture with the red block...
Can I immediately make a circle without saving the image like I was doing before ?

 
Upvote 0

Biswajit

Active Member
Licensed User
Longtime User
Place an ImageView inside a Panel. Set Panel background drawable to circle shape. Load image to ImageView it will automatically clip the image.

 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…