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

后端 未结 7 1948
眼角桃花
眼角桃花 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 11:58

    I cannot reproduce count==2 for single touch. It is 1 for me for single touch. Try debug your code on real device and see what you actually have.

    Use event.getPointerId(i) along with event.getPointerCount() and see what these actual points of touch are.

提交回复
热议问题