Android Question Bitmap and B4A ImageView Background

Scantech

Well-Known Member
Licensed User
B4X:
    Gradient1.Initialize(10, Height)
    Gradient1.FillGradient(Clrs, Gradient1.TargetRect, Orientation)
    Brush1 = Gradient1.CreateBrushFromBitmapCreator(Gradient1)
    bc1.Initialize(Width, Height)    'First Square
    bc1.DrawRectRounded2(bc1.TargetRect, Brush1, True, 0, Radius)
    bmp1 = bc1.Bitmap
Setting ImageView Bitmap to bmp1 or bc1.bitmap will fill entire screen without the radius corners. Why is that? Canvas draws it properly with corner radius. I even tried B4XViews and same results with corners.

Update: using this fixes the issue
B4X:
        BitMapCreation.bc1.SetBitmapToImageView(BitMapCreation.bmp1, imvGauge)
 
Last edited:
Top