I am creating an Android 4.0 app and need some help.
I have extended RelativeLayout to be zoomable/pannable via the code I found here:
Android - zoom in/out RelativeLayout with spread/pinch and here https://stackoverflow.com/a/12438004/1458279
I have created my own custom user view (SectionView) that I have placed in my ZoomableRelativeLayout and I've written an Activity that uses this layout.
I'm overriding onTouchEvent in my ZoomableRelativeLayout and I'm able to detect when a user has "clicked" rather than started to "drag" by looking at the duration between ACTION_DOWN and ACTION_UP. see: How to distinguish between move and click in onTouchEvent()?
So.. I know when the ZoomableRelativeLayout was clicked - now, how do I turn that "click" into some event on the SectionView control (if one of the SectionView controls is beneath the finger doing the clicking) so I can detect it from the Activity.
What I've done so far -
In the instance when I've detected a click on my ZoomableRelativeLayout I am setting onTouchEvent to return FALSE - as I understand this means it hasn't been handled, so I expected other touch events for controls within the RelativeLayout to be able to handle them instead.
However, no matter what I try I don't seem to be able to get my SectionView control to respond to Touch Events in order to raise an event in the Activity .
I'm not an Android expert so I'm possibly missing something really obvious - PLEASE help preferably with a simple example as I've been working on this for ages and I don't feel like I'm getting anywhere.
Thanks