Private Sub Button1_Click
ToastMessageShow("Button1 clicked", False)
End Sub
Private Sub ExecuteClick(x As Float, y As Float)
Private vw As View
For i = 0 To Activity.NumberOfViews - 1
vw = Activity.GetView(i)
If PointIsIntoView(vw, x, y) Then
If vw Is Button Then
CallSub("main", vw.tag & "_Click")
Exit
End If
End If
Next
End Sub
Private Sub PointIsIntoView(Vw As View, x As Float, y As Float) As Boolean
Return x >= Vw.Left AND x <= Vw.Left + Vw.Width AND _
y >= Vw.Top AND y <= Vw.Top + Vw.Height
End Sub