How to detect single touch as well as multi-touch in onTouchEvent()

后端 未结 7 1940
眼角桃花
眼角桃花 2020-12-29 11:19

I used the following code to detect the single finger touch and double finger touch. The code detects the double finger touch (when count==2).

I need t

7条回答
  •  感情败类
    2020-12-29 12:01

    If I understand correctly, single touch will not cause ACTION_POINTER_UP, but ACTION_UP. That is why it doesn't detect the single finger. See this post for reference: https://stackoverflow.com/a/4269592/1084813

提交回复
热议问题