Sub Globals
Private tmpX, tmpY, Tolerance as Float
end sub
Private Sub pn_Touch (Action As Int, X As Float, Y As Float)
Dim pn As Panel = Sender
Tolerance = 5
Select Action
Case Activity.ACTION_DOWN
tmpX = X
tmpY = Y
Case Activity.ACTION_UP
If Abs(tmpx - X) > Tolerance Or Abs(tmpY - Y) > tolerance Then
'Slid
Else
'Touch
End If
Case Activity.ACTION_MOVE
End Select
End Sub
If you want to detect the Touch event AND a LongClick at the same time you need to make it on your own in the Touche event.
Use a global variable and set it to the current time in MouseDown.
Then in MouseUp, check the time elapsed since MouseDown and may be, if necessary, check the postion to distiguih between a click and a Move.