Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim Panel1 As Panel
Dim Canvas1 As Canvas
Dim b As Bitmap
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
'Activity.LoadLayout("Layout1")
Panel1.Initialize("panel1")
Activity.AddView(Panel1,0, 200dip,400dip,400dip)
Canvas1.Initialize(Panel1)
Dim r1, r2 As Rect
b.Initialize(File.DirAssets, "test.png")
r1.Initialize(0,0, b.Width, b.Height)
Canvas1.DrawBitmap(b, Null, r1)
End Sub
Sub panel1_Touch (Action As Int, X As Float, Y As Float)
If Action= 1 Then
If x < b.Width And y < b.height Then
Log("X " & X)
Log("Y " & Y)
End If
End If
End Sub