I'm trying to detect pinch using multitouch in onTouchEvent
of the activity. But the coordinates I'm getting are behaving erratically sometimes. For example I'm getting the following coordinates one after another and as you can see X value jumps suddenly:
06-08 20:48:38.625: DEBUG/(1989): X0:300.6635,Y0:655.4612
06-08 20:48:38.635: DEBUG/(1989): X1:181.23222,Y1:224.74033
06-08 20:48:38.835: DEBUG/(1989): X0:293.20694,Y0:653.9503
06-08 20:48:38.845: DEBUG/(1989): X1:185.0237,Y1:228.76929
06-08 20:48:38.845: DEBUG/(1989): X0:185.0237,Y0:653.8244 (Jumps to the X value of the other pointer)
06-08 20:48:38.845: DEBUG/(1989): X1:185.0237,Y1:228.76929
T开发者_开发问答his is coming from Nexus One while doing a pinch gesture.
Any ideas why?
The Nexus One has a defective multi touch sensor/software. It seems that whenever your two fingers cross on an axis, the coordinates can get messed up. This app will help demonstrate the problem on your phone.
The good news is that this is a problem exclusive to the N1 so you can still make the application as you want, just note in the description that the N1 may have problems.
精彩评论