1

How to implement item touches on SurfaceView

view story
linux-howto

http://stackoverflow.com – I'm developing an android game with the standard pattern of SurfaceView, SurfaceHolder, Canvas, etc. In this game I will be drawing multiple bitmaps on the canvas that I would like to know if they've been touched. I am aware that I can override onTouchEvent() for SurfaceView and could linearly walk through all my items to determine if the touch coordinates contains the area of one of my bitmaps, but I was wondering if I could make things easier on myself. Here's my question: Can I have classes which handle drawing my bitmaps on the screen descend from android.View, attach them to my SurfaceVi (HowTos)