Hi Dennis-

The best way to approach this depends on what platforms you're targetting.

For Honeycomb and later (api level: 11), it's actually pretty 
straightforward:  View has two methods, setScaleX and setScaleY
http://developer.android.com/reference/android/view/View.html#setScaleX(float)
http://developer.android.com/reference/android/view/View.html#setScaleY(float)

When you use these methods, touch events will be transformed appropriately 
during dispatch.

For Gingerbread and earlier, it's a little more involved.
The parent needs to override onInterceptTouchEvent, return true for 
everything in that method, and perform its own dispatch in onTouchEvent.
The parent also needs to perform the necessary transformation of the 
MotionEvent.  

Unless you're on at least Gingerbread, there's no way to get the individual 
touch points out of the MotionEvent, so children of the view will really 
only be able to respond to mono touch events (single finger).  From your 
description it doesn't sound like this part will present problems (I don't 
imagine you'll be selecting a seat by two-finger tapping it, for instance), 
but it's something to be aware of.  Also, this only effects the children 
you're manually dispatching events to-  The parent view will still be able 
to pinch zoom.


-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" 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-developers?hl=en

Reply via email to