Hello everyone, sorry for my English.
I need to use the vertical motion (y) of the finger on the screen to create a movement similar to the slide
The code works only horizontal movement and vertical ... :BangHead:
Top to bottom. give me a hand to understand how to proceed.
I need to use the vertical motion (y) of the finger on the screen to create a movement similar to the slide
B4X:
Sub Panel1_Touch (Action As Int, X As Float, Y As Float) As Boolean 'Return True to consume the event
select Action
Case Activity.ACTION_DOWN
LastY = Y
Case Activity.ACTION_MOVE
If Abs (Y - LastY)> 0 Then
index = index + 1
If index> 1 Then value1.Length-1
index = 0
end If
else
index = index-1
If index <0 Then
index = 0
end If
end If
scrollValue
Case Activity.ACTION_UP
end Select
Return True
end Sub
The code works only horizontal movement and vertical ... :BangHead:
Top to bottom. give me a hand to understand how to proceed.