#Region Project Attributes
#ApplicationLabel: Simple Draw Functions
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: portrait
#CanInstallToExternalStorage: False
#End Region
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
Sub Process_Globals
End Sub
Sub Globals
Private p3 As Panel
Private cvsLayer As Canvas
Private butn1 As ToggleButton
Private xc, yc, x1, y1, x2, y2, r1, r2, h, w As Float
End Sub
Sub Activity_Create(FirstTime As Boolean)
x1 = 2%x
w = 30%x
y1 = 100%y - 55dip
h = 50dip
p3.Initialize("p3")
Activity.AddView(p3, 0, 0, 100%x, 85%y)
cvsLayer.Initialize(p3)
butn1.Initialize("butn1")
Activity.AddView(butn1, x1, y1, w, h)
butn1.TextOn = "Layer" & " ON"
butn1.TextOff = "Layer" & " OFF"
End Sub
Sub Activity_Resume
cvsLayer.DrawColor(Colors.Gray) 'draw 2 circles
xc = 420dip
yc = 330dip
r1 = 60dip
r2 = 50dip
cvsLayer.DrawCircle(xc, yc, r1, Colors.Blue, True, 3dip)
cvsLayer.DrawCircle(xc, yc, r2, Colors.Transparent, True, 1dip)
End Sub
Sub butn1_CheckedChange(Checked As Boolean)
p3.Visible = Not(p3.Visible)
End Sub