Android Question SMM Round image top corners


Active Member
Licensed User
Longtime User
Hi , I'm trying set the corner radius of a image loaded with SimpleMediaManager but this is not working.

I'm using this function:

Sub setCornerRadii(v As View, Rx_TopLeft As Float, Ry_TopLeft As Float, Rx_TopRight As Float, Ry_TopRight As Float, Rx_BottomRight As Float, Ry_BottomRight As Float, Rx_BottomLeft As Float, Ry_BottomLeft As Float)
    Dim jo As JavaObject = v.Background
    If v.Background Is ColorDrawable Or v.Background Is GradientDrawable Then
        jo.RunMethod("setCornerRadii", Array As Object(Array As Float(Rx_TopLeft, Ry_TopLeft, Rx_TopRight, Ry_TopRight, Rx_BottomRight, Ry_BottomRight, Rx_BottomLeft, Ry_BottomLeft)))
    End If
End Sub


B4X founder
Staff member
Licensed User
Longtime User
MediaManager.SetMediaWithExtra(Pane1, "", "", CreateMap(MediaManager.REQUEST_CALLBACK: Me, MediaManager.REQUEST_BACKGROUND: xui.Color_LightGray))
Pane1.Visible = False
Wait For (Pane1) SMM_MediaReady (Success As Boolean, Media As SMMedia)
setCornerRadii(Pane1, 10dip, 10dip, 10dip, 10dip, 0, 0, 0, 0)
Pane1.Visible = True
Upvote 0