B4A Library SelectableRoundedImageView

Similar threads

B4A Library PDFium - Pdfview2
B4A Library IPCamView
B4A Library msEmoji V1.0.0
B4A Library CreditsRollView V1.0.0
B4A Library VRCalendarView
B4A Tutorial [java] Custom View with Designer Support (Java library)

Johan Schoeman

Licensed User
This library wraps this project. The code is self explanatory and quite simple. Attached the B4A project. The library files (JAR & XML) are in the /files folder of the attached project. Copy them to your additional libraries folder.

You can set the radius of each of the 4 corners of the bitmap individually (dip - pass a float)
You can set the color of the border
You can set the width of the border (dip - pass a float)
You can pass a Boolean (=True) for the bitmap to appear oval shaped

It uses resource /Objects/res/values/attrs.xml - include it in your project.

Thanks @DonManfred!


  • SelectableRoundedImage
    • ba As BA
    • BringToFront
    • DesignerCreateView (base As PanelWrapper, lw As LabelWrapper, props As Map)
    • Invalidate
    • Invalidate2 (arg0 As Rect)
    • Invalidate3 (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
    • IsInitialized As Boolean
    • RemoveView
    • RequestFocus As Boolean
    • SendToBack
    • SetBackgroundImage (arg0 As Bitmap)
    • SetColorAnimated (arg0 As Int, arg1 As Int, arg2 As Int)
    • SetLayout (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int)
    • SetLayoutAnimated (arg0 As Int, arg1 As Int, arg2 As Int, arg3 As Int, arg4 As Int)
    • SetVisibleAnimated (arg0 As Int, arg1 As Boolean)
    • setCornerRadiiDP (leftTop As Float, rightTop As Float, leftBottom As Float, rightBottom As Float)
    • Background As Drawable
    • BorderColor As Int [write only]
    • BorderWidthDP As Float [write only]
    • Color As Int [write only]
    • Enabled As Boolean
    • Height As Int
    • ImageBitmap As Bitmap [write only]
    • Left As Int
    • Oval As Boolean [write only]
    • Tag As Object
    • Top As Int
    • Visible As Boolean
    • Width As Int


Last edited:


Active Member
Licensed User
How to set the Gravity propriety of the images?
With your example i can see only a small picture of the dogs inside the boxes...

Johan Schoeman

Licensed User
Yes, sure. Take a look
Please try it with the attached new library files (I am shooting in the dark here as I don't see what you see on any of my devices)....