Detecting touch area on Android

前端 未结 3 1759
余生分开走
余生分开走 2021-01-05 21:56

Is it possible to detect every pixel being touched? More specifically, when the user touches the screen, is it possible to track all the x-y coordinates of the cluster of po

3条回答
  •  青春惊慌失措
    2021-01-05 22:19

    If you have a listener on your image it will respond that there was a touch within that bounding box, basically.

    So, to get what you want, you could, but, I would never do this, create a box around every pixel, or small group of pixels, and listen for a touch.

    Wherever you get a touch, it may fire off an event, then you can react accordingly.

    I can't think of any other solution that will give you each pixel that a person touched, at one time.

    You may want to read up on multitouch though, as there are some suggestions in here that my help you:

    http://android-developers.blogspot.com/2010/06/making-sense-of-multitouch.html

提交回复
热议问题