Android Question Simple Media Manager Image Corner Radius

jcesar

Active Member
Licensed User
Longtime User
Hi

Is there a way to set the corner radius of a image downloaded with Simple Media Manager ?
 

PaulMeuris

Active Member
Licensed User
A quick search on the forum gave me this link:
b4ximageview-imageview-resize-modes
How can you use it?
B4XImageView:
    B4XImageView1.Bitmap = LoadBitmap(File.DirAssets, "koh-samui-thailand.jpg")
    B4XImageView1.RoundedImage = True
    B4XImageView1.CornersRadius = 30
    B4XImageView1.ResizeMode = "FILL"
B4XImageView added to the designer. Don't forget to add the library XUI Views.
An image file in the Files Manager pane of the IDE.
b4ximageview_example.PNG

That's it.
Greetings.
Paul
 
Upvote 0

TILogistic

Expert
Licensed User
Longtime User
?
B4X:
   Extra.Put(MediaManager.REQUEST_FADE_ANIMATION_DURATION, 0)
    Extra.Put(MediaManager.REQUEST_BACKGROUND, xui.Color_Transparent)
    Extra.Put(MediaManager.REQUEST_RESIZE_MODE, "FILL")
    Extra.Put(MediaManager.REQUEST_ROUNDIMAGE, True)

or

SetCircleClip

 
Upvote 0

TILogistic

Expert
Licensed User
Longtime User
sample 2 SMM
B4X:
            MediaManager.SetMediaWithExtra(pnl.GetView(x).GetView(0), $"https://picsum.photos/id/${data.IndexOfFirstImage + x}/200/300.jpg"$, "image/*", Extra)
            Wait For (pnl.GetView(x).GetView(0)) SMM_MediaReady (Success As Boolean, Media As SMMedia)
            If Success Then           
                pnl.GetView(x).GetView(0).GetView(0).Tag.As(B4XImageView).CornersRadius = 30dip
            End If
see:
1654761552931.png
 
Upvote 0
Top