' Create a static rounded bar
Sub DrawBar (Pane As B4XView, BackgroundColor As Int, Width As Double, Height As Double, CornerRadius As Int)
Try
If Width < 1 Or Height < 1 Then Return
Dim mIV As B4XView
Dim iv As ImageView
Dim bc As BitmapCreator
iv.Initialize("")
mIV = iv
Pane.AddView(mIV, 0, 0, Width, Height)
bc.Initialize(Width, Height)
bc.DrawRectRounded(bc.TargetRect, BackgroundColor, True, 0, CornerRadius)
bc.SetBitmapToImageView(bc.Bitmap, mIV)
Catch
Log(LastException)
End Try
End Sub