Sub Globals
Dim scroll1 As ScrollView
Dim panel1 As Panel
Dim canvas1 As Canvas
Dim xc, yc, x1, y1, x2, y2, r1, r2, h, w As Float
End Sub
Sub Activity_Create(FirstTime As Boolean)
If FirstTime Then
x1 = 0.5%x
y1 = 100%y - 55dip
y2 = 100%y - 102dip
w = 20%x
h = 50dip
scroll1.Initialize(100dip)
panel1.Initialize("panel1")
textbox.Initialize("text1")
panel1.Color = Colors.LightGray
Activity.AddView(scroll1, 0, 0, 100%x, 75%y)
Activity.AddView(panel1, 0, 0, 100%x, 75%y)
canvas1.Initialize(panel1)
panel1.Initialize(scroll1)
Scroll1.Panel.Height = 200dip
Scroll1.Panel.Width = 200dip
Scroll1.Panel.AddView(panel1, 5dip, 5dip * 200dip, Scroll1.Width - 10dip, 190dip)
Activity.AddView(btn1, x1, y2, w, h)
Activity.AddView(btn2, x1, y1, w, h)
Activity.AddView(textbox,0,80%x,50%x,40dip)
End If
End Sub
Sub Activity_Resume
Drawing
End Sub
Sub Activity_Pause (UserClosed As Boolean)
Drawing
End Sub
Sub Drawing
Activity.Invalidate
canvas1.DrawColor(Colors.White)
x1 = 100dip
y1 = 10dip
x2 = 150dip
y2 = 20dip
canvas1.DrawLine(x1, y1, x2, y2, Colors.Red, 0)
xc = 90dip
yc = 130dip
r1 = 70dip
canvas1.DrawCircle(xc, yc, r1, Colors.Green, False, 2dip)
canvas1.DrawText("Hello", x1, y1, Typeface.DEFAULT, 16, Colors.Red, "RIGHT")
Sub panel1_Touch (Action As Int, X As Float, Y As Float)
End Sub
Sub scroll1_Touch (Action As Int, X As Float, Y As Float)
End Sub