Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.RootPane.LoadLayout("1") 'Load the layout file.
MainForm.Show
Dim bc As BitmapCreator
Dim scale As Float = 100dip / 100
bc.Initialize(ImageView1.Width / scale, ImageView1.Height / scale)
Dim r As B4XRect
r.Initialize(0, 0, bc.mWidth / 2, bc.mHeight / 2)
FillRadialGradient(bc, Array As Int(xui.Color_White, xui.Color_Black), r)
r.Initialize(bc.mWidth / 2, 0, bc.mWidth, bc.mHeight / 2)
FillRadialGradient(bc, Array As Int(xui.Color_Red, xui.Color_Green, xui.Color_Blue), r)
r.Initialize(bc.mWidth / 2, bc.mHeight / 2, bc.mWidth, bc.mHeight)
FillRadialGradient(bc, Array As Int(xui.Color_Black, xui.Color_White), r)
r.Initialize(0, bc.mHeight / 2, bc.mWidth / 2, bc.mHeight)
FillRadialGradient(bc, Array As Int(xui.Color_Red, 0xFFFF5200, xui.Color_Yellow, xui.Color_Green, xui.Color_Blue, _
0xFFBF00FF, 0xFFFF00BB), r)
ImageView1.SetBitmap(bc.Bitmap)
End Sub