Can you get the image coordinates from MotionEvent? Don't the getX() and getY() functions return the *screen* X and Y coords, which aren't even necessarily on the image?
On Oct 29, 10:36 pm, Justin Anderson <[email protected]> wrote: > Use View.OnTouchListener... It provides an onTouch() method with a > MotionEvent object... This should give you the information you need... > > ---------------------------------------------------------------------- > There are only 10 types of people in the world... > Those who know binary and those who don't. > ---------------------------------------------------------------------- > > On Wed, Oct 28, 2009 at 4:07 PM, Chris <[email protected]> wrote: > > > Hi All > > > I have one image (it's a guitar fretboard), and I want to identify/act > > on touch of events when different parts of the image are touched/ > > selected. > > > I can set the whole image to be clickable with setClickOnListener of > > ImageView. > > > Is there a way to either: > > > 1. Identify the coordinates of which point has been touched? > > 2. Define sub areas on the image and setClickOnListener for those > > areas? > > > Otherwise, I'm thinking I must implement a GridView and dissect my > > image into individual images and arrange them so they look like one > > large image. > > > Thanks for any help! > > Chris -- You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en

