I have been having the hardest time trying to figure this out, so I really hope someone can help, or at least point me in the correct direction.
My goal is to have a ViewGroup which supports scaling and panning.
I have tried a bunch of different approaches. Lately with this View with horizontal and vertical pan/drag and pinch-zoom.
Pinching and zooming works fine, and so does a single tap when in unzoomed or unpanned mode.
However, if i zoom the view and tap the screen, onTouch of the childview is triggered with the view that was placed in the tapped position of the unzoomed ViewGroup. It's like the content of the childviews is getting scaled, panned, and drawn correct, but the views themselves stay where they are.
Am I missing some native understanding?
Background. All my views are generated programmatically, and all the subviews to the custom ViewGroup have their own OnTouchListener. There are typically between one and 5 subviews.
I have not added any code, as I am now back to using the code from the link as is.