Hi ivanomonti,
You also asked a similar question in the
english forum and there I asked you back what exactly you want to do but no answer there yet.
Depending on what you want to do the answer could be different.
Do you want to move something when you move the finger or do you want only have the information when you release the finger.
The code in post #15 will not work:
Y1 = Y - Y0
If Abs(Y1 - Y-Y0) > 40 Then
You have Y1 = Y - Y0 then you have Y1 - Y - Y0 so Y - Y0 - Y - Y0 = -2Y0
and Abs(-2Y0) = 2Y0
In the code in the
english post:
If Abs (Y - LastY)> 0 Then
Abs (Y - LastY) will always be 0 or positive, because you take the absolute value !
Are you trying to make a wheel selector like the screenshot in post #15 ?
If yes, what kind of view are you using for the name display ?
Then you would probably add a kind of dynamic sliding.
If you want you could post a small project with what you have done and I could have a look at it.
In your code in the Touch event routine you should also remove
Return True
and change this
Sub Panel1_Touch (Action As Int, X As Float, y As Float) remove the
As Boolean at the end.
It's no more needed this has changed since version 2.00
In standard Android if you use the Touch event this one consumes the Click and LongClick events. If you really need these you must code them yourself within the Touch event and a Timer as Dominex already suggested.
Best regards.