How can I recognize a pointer in ontouchlistener?
I'm developing a program(phone as a mouse) using multitouch on android 2.2. I just use ontouch method of ontouchlistener. It seems that ontouch is a event oriented method that it can not remember a specific pointer.
For example, I got a finger down on the screen, say pointer A, then another finger down on 开发者_运维问答the screen, say pointer B. How can I recognize which one of A and B is up when there is ACTION_POINTER_UP or ACTION_UP event?
Hope I'm clear enough. I haven't tried the gesturedetector yet.
ACTION_DOWN - primary pointer. (first finger) has gone down
ACTION_POINTER_DOWN - secondary pointer. (second finger) gone down
ACTION_MOVE - change in pressed location
ACTION_POINTER_UP = secondary pointer released
ACTION_UP - primary pointer released
good luck.
Multi touch in Android is explained in detail in this article How to use multi-touch in Android
精彩评论