tags:

views:

44

answers:

2

I'm trying to implement pinch-zoom in an app I'm making and am having issues with the onTouch event. It appears that the pointer up & down actions do not fire immediately, like you won't get a pointer up or down until an action move occurs. So what happens if both fingers hit the screen nearly simultaneously is that the 2nd finger (should be pointer(1)) gets a move action before pointer down is called, making the code think it's a DRAG not a pinch zoom. Anyone else seen this? Anyway around it? Thanks.

A: 

Hi

I had the same issue in my project. If i touch the screen and my fingers are too close togheter the system doesn't realize a multitouch event. I think that is because when your fingers are too close togheter the system sees it as a single finger.

Maybe you can check this assumption using getSize() method to estimate the area of the screen being pressed when you touch the screen with a single finger and when you touch the screen with two finger close togheter.

hara
Thanks for the advice, that will come in handy I'm sure. But I'm not sure that's my problem as it occurs no matter where I touch the screen. Using the debugger I can see that the pointer up and down events seem to always be delayed, and occur after a move event (and the move event always just has a single pointer in that instance). I even tried the "Dotty" app and could see same behavior in it. Could it be a hardware issue? I have an Evo w/ custom ROM. Thanks.
JStew
A: 

Turned out to be a problem with the Custom ROM I had flashed to my Evo. Thanks again to hara for their advice as that turned out to be another bug I had.

JStew