Sub Globals
Dim GD As GestureDetector
Dim pnlGreen As Panel
Private Panel1 As Panel
Private Label1 As Label
Dim pnlpos As Object
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("frm_main")
GD.SetOnGestureListener(Panel1, "Gesture")
pnlpos = Panel1.Top
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub Gesture_onDrag(deltaX As Float, deltaY As Float, MotionEvent As Object)
Log(" onDrag deltaX = " & deltaX & ", deltaY = " & deltaY & ", ev = " & MotionEvent)
'pnlGreen.Left = Max(0, Min(pnlGreen.Left + deltaX, 100%x - pnlGreen.Width))
Panel1.Top = Max(pnlpos, Min(Panel1.top + deltaY, 100%y - Panel1.height))
End Sub