How to dectect gestures?
Monkey Targets Forums/Android/How to dectect gestures?
| ||
How do you differ between a "moving" gesture of the fingers for scrolling and a click. I want to build a list like it is often on Android Mobiles: The list is longer than the screen, but if your fingers move vertical over the lines, they begin to scroll. Is this possible also with Monkey? |
| ||
The way I do these things is by keeping tabs on when the mouse is down and when it is released. When it changes from down to released then you have a click, while it is down handle the scrolling.... |
| ||
So scrolling would probably be pretty simple. Just keeping the x/y of the background or image or whatever under the mouse/finger until it's released. BUT... how would you handle multi-touch gestures like pinch to zoom and such? |
| ||
I published some code about it, not perfect, but it shows the way: http://www.monkeycoder.co.nz/Community/posts.php?topic=3718#bottom and yesterday someone published a gesture class: http://www.monkeycoder.co.nz/Community/posts.php?topic=3947 |
| ||
Thanks. I think that gesture class is exactly what I was looking for. |