Disable or prevent multitouch in Activity

前端 未结 9 1747
闹比i
闹比i 2020-11-30 03:11

I have several Views on an Activity which a user wants to touch quickly in succession and I capture these touches using a TouchListener and handling Motio

9条回答
  •  情书的邮戳
    2020-11-30 03:30

    The best way to work around this scenario is to use a ViewGroup and implement the onInterceptTouchEvent method to manually route the touch events as you see fit.

    This was originally answered here: Android multitouch! hack anyone?

    Code implementing this solution (found in the comments section of the answer to the above question) is found here: http://pastebin.com/hiE1aTCw

提交回复
热议问题