Sub Globals
Dim MOVEMENT_THRESHOLD As Int = 200dip
Dim StartY As Int
End Sub
Sub Swipe(Down As Boolean)
If Down Then
Log("Down")
Else
Log("Up")
End If
End Sub
Sub Activity_Touch (Action As Int, X As Float, Y As Float)
Select Action
Case Activity.ACTION_DOWN
StartY = Y
Case Activity.ACTION_UP
If Abs(Y - StartY) > MOVEMENT_THRESHOLD Then
Swipe(Y > StartY)
End If
End Select
Return True
End Sub